[cfe-commits] r130660 - /cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Abramo Bagnara
abramo.bagnara at gmail.com
Sun May 1 09:25:54 PDT 2011
Author: abramo
Date: Sun May 1 11:25:54 2011
New Revision: 130660
URL: http://llvm.org/viewvc/llvm-project?rev=130660&view=rev
Log:
Fixed source range for extern linkage specification without braces.
Modified:
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=130660&r1=130659&r2=130660&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Sun May 1 11:25:54 2011
@@ -202,6 +202,11 @@
MaybeParseMicrosoftAttributes(attrs);
if (Tok.isNot(tok::l_brace)) {
+ // Reset the source range in DS, as the leading "extern"
+ // does not really belong to the inner declaration ...
+ DS.SetRangeStart(SourceLocation());
+ DS.SetRangeEnd(SourceLocation());
+ // ... but anyway remember that such an "extern" was seen.
DS.setExternInLinkageSpec(true);
ParseExternalDeclaration(attrs, &DS);
return Actions.ActOnFinishLinkageSpecification(getCurScope(), LinkageSpec,
More information about the cfe-commits
mailing list