[LLVMbugs] [Bug 14475] New: Assertion `Loc.isMacroID() && "Not a macro expansion loc!"' failed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Dec 1 04:06:51 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14475
Bug #: 14475
Summary: Assertion `Loc.isMacroID() && "Not a macro expansion
loc!"' failed
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: nunoplopes at sapo.pt
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat a.c
#define A(v) (var->v)
#define B A
void foo(int var) {
B(var);
}
$ clang -cc1 -fsyntax-only a.c
a.c:5:5: error: member reference type 'int' is not a pointer
clang: SourceManager.cpp:950: std::pair<clang::SourceLocation,
clang::SourceLocation>
clang::SourceManager::getImmediateExpansionRange(clang::SourceLocation) const:
Assertion `Loc.isMacroID() && "Not a macro expansion loc!"' failed.
0 clang 0x0a6e7951
1 clang 0x0a6e75a8
2 linux-gate.so.1 0xb773b400 __kernel_sigreturn + 0
3 libc.so.6 0xb7477b0c abort + 380
4 libc.so.6 0xb746f17c
5 libc.so.6 0xb746f237
6 clang 0x0990b2c6
clang::SourceManager::getImmediateExpansionRange(clang::SourceLocation) const +
82
7 clang 0x08956c0f
8 clang 0x08956ddb
clang::DiagnosticRenderer::emitMacroExpansionsAndCarets(clang::SourceLocation,
clang::DiagnosticsEngine::Level,
llvm::SmallVectorImpl<clang::CharSourceRange>&,
llvm::ArrayRef<clang::FixItHint>, clang::SourceManager const&, unsigned int&,
unsigned int) + 147
9 clang 0x08956ef2
clang::DiagnosticRenderer::emitMacroExpansionsAndCarets(clang::SourceLocation,
clang::DiagnosticsEngine::Level,
llvm::SmallVectorImpl<clang::CharSourceRange>&,
llvm::ArrayRef<clang::FixItHint>, clang::SourceManager const&, unsigned int&,
unsigned int) + 426
10 clang 0x089562c2
clang::DiagnosticRenderer::emitDiagnostic(clang::SourceLocation,
clang::DiagnosticsEngine::Level, llvm::StringRef,
llvm::ArrayRef<clang::CharSourceRange>, llvm::ArrayRef<clang::FixItHint>,
clang::SourceManager const*, llvm::PointerUnion<clang::Diagnostic const*,
clang::StoredDiagnostic const*>) + 748
11 clang 0x088eacb4
clang::TextDiagnosticPrinter::HandleDiagnostic(clang::DiagnosticsEngine::Level,
clang::Diagnostic const&) + 900
12 clang 0x098f4d54
clang::DiagnosticIDs::EmitDiag(clang::DiagnosticsEngine&,
clang::DiagnosticIDs::Level) const + 122
13 clang 0x098f4ccf
clang::DiagnosticIDs::ProcessDiag(clang::DiagnosticsEngine&) const + 645
14 clang 0x098f0b89
15 clang 0x098eeb96
clang::DiagnosticsEngine::EmitCurrentDiagnostic(bool) + 244
16 clang 0x08ce7231 clang::Sema::EmitCurrentDiagnostic(unsigned int)
+ 1059
17 clang 0x08ce9fd0
18 clang 0x08ee0d4f
clang::Sema::LookupMemberExpr(clang::LookupResult&,
clang::ActionResult<clang::Expr*, true>&, bool&, clang::SourceLocation,
clang::CXXScopeSpec&, clang::Decl*, bool) + 991
19 clang 0x08ee3330 clang::Sema::ActOnMemberAccessExpr(clang::Scope*,
clang::Expr*, clang::SourceLocation, clang::tok::TokenKind,
clang::CXXScopeSpec&, clang::SourceLocation, clang::UnqualifiedId&,
clang::Decl*, bool) + 868
20 clang 0x08c9ec04
clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*,
true>) + 4228
21 clang 0x08c9db6a clang::Parser::ParseCastExpression(bool, bool,
bool&, clang::Parser::TypeCastState) + 10606
22 clang 0x08c9b091 clang::Parser::ParseCastExpression(bool, bool,
clang::Parser::TypeCastState) + 79
23 clang 0x08c99fc3
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 203
24 clang 0x08c99d57
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 47
25 clang 0x08ca1a9d
clang::Parser::ParseParenExpression(clang::Parser::ParenParseOption&, bool,
bool, clang::OpaquePtr<clang::QualType>&, clang::SourceLocation&) + 4399
26 clang 0x08c9b327 clang::Parser::ParseCastExpression(bool, bool,
bool&, clang::Parser::TypeCastState) + 299
27 clang 0x08c9b091 clang::Parser::ParseCastExpression(bool, bool,
clang::Parser::TypeCastState) + 79
28 clang 0x08c99fc3
clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) + 203
29 clang 0x08c99d57
clang::Parser::ParseExpression(clang::Parser::TypeCastState) + 47
30 clang 0x08cc318b clang::Parser::ParseExprStatement() + 75
31 clang 0x08cc2bc8
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&)
+ 1660
32 clang 0x08cc2443
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*,
32u>&, bool, clang::SourceLocation*) + 151
33 clang 0x08cc5105 clang::Parser::ParseCompoundStatementBody(bool) +
1245
34 clang 0x08cc992f
clang::Parser::ParseFunctionStatementBody(clang::Decl*,
clang::Parser::ParseScope&) + 299
35 clang 0x08c6adcb
clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) +
3113
36 clang 0x08c79d2f
clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, unsigned int, bool,
clang::SourceLocation*, clang::Parser::ForRangeInit*) + 481
37 clang 0x08c6a0cf
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1031
38 clang 0x08c6a178
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier) + 150
39 clang 0x08c6997c
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) + 2350
40 clang 0x08c68f92
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 432
41 clang 0x08c65ce1 clang::ParseAST(clang::Sema&, bool, bool) + 333
42 clang 0x088c7ba4 clang::ASTFrontendAction::ExecuteAction() + 284
43 clang 0x088c77dc clang::FrontendAction::Execute() + 180
44 clang 0x088a07e0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 742
45 clang 0x088748b5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 918
46 clang 0x08865f11 cc1_main(char const**, char const**, char const*,
void*) + 671
47 clang 0x0886f7c0 main + 495
48 libc.so.6 0xb7462597 __libc_start_main + 231
49 clang 0x088656b1
Stack dump:
0. Program arguments: clang -cc1 -fsyntax-only a.c
1. a.c:5:3 <Spelling=a.c:1:21>: current parser token ')'
2. a.c:4:19: parsing function body 'foo'
3. a.c:4:19: in compound statement ('{}')
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list