LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 21970 - [fuzz] Assertion `Ctx->isFileContext() && "We should have been looking only at file context here already."' failed.
Summary: [fuzz] Assertion `Ctx->isFileContext() && "We should have been looking only a...
Status: NEW
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: trunk
Hardware: PC Linux
: P normal
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks: 23057
  Show dependency tree
 
Reported: 2014-12-18 16:10 PST by Sami Liedes
Modified: 2015-03-30 19:00 PDT (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sami Liedes 2014-12-18 16:10:44 PST
Fuzzing discovered that the test case below, when given as input to

  clang -fno-crash-diagnostics -std=c++11 -xc++ -c -emit-llvm

causes this assertion failure:

clang-3.6: tools/clang/lib/Sema/SemaLookup.cpp:1140: bool clang::Sema::CppLookupName(clang::LookupResult&, clang::Scope*): Assertion `Ctx->isFileContext() && "We should have been looking only at file context here already."' failed.

Test case:

--------------------------------------------------
class { template <typename I, I::(((; namespace { o
--------------------------------------------------