[cfe-commits] r126943 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp lib/Sema/SemaDeclCXX.cpp lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriterDecl.cpp test/Index/recursive-cxx-member-calls.cpp

Abramo Bagnara abramo.bagnara at gmail.com
Thu Mar 3 07:23:48 PST 2011


Il 03/03/2011 16:02, Douglas Gregor ha scritto:
> 
> On Mar 3, 2011, at 6:52 AM, Abramo Bagnara wrote:
> 
>> Author: abramo
>> Date: Thu Mar  3 08:52:38 2011
>> New Revision: 126943
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=126943&view=rev
>> Log:
>> Fixed end source location for LinkageSpecDecl.
>>
>> Modified:
>>    cfe/trunk/include/clang/AST/DeclCXX.h
>>    cfe/trunk/lib/AST/DeclCXX.cpp
>>    cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>>    cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
>>    cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
>>    cfe/trunk/test/Index/recursive-cxx-member-calls.cpp
>>
>> Modified: cfe/trunk/include/clang/AST/DeclCXX.h
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=126943&r1=126942&r2=126943&view=diff
>> ==============================================================================
>> --- cfe/trunk/include/clang/AST/DeclCXX.h (original)
>> +++ cfe/trunk/include/clang/AST/DeclCXX.h Thu Mar  3 08:52:38 2011
>> @@ -1711,18 +1711,21 @@
>>   /// Language - The language for this linkage specification.
>>   LanguageIDs Language;
>>
>> -  /// HadBraces - Whether this linkage specification had curly braces or not.
>> -  bool HadBraces : 1;
>> +  /// LBraceLoc - The source location for the left brace (if valid).
>> +  SourceLocation LBraceLoc;
>> +  /// RBraceLoc - The source location for the right brace (if valid).
>> +  SourceLocation RBraceLoc;
> 
> Do we really need the left-brace location? It doesn't seem like we have to have it, and I'd rather not grow the size of the AST any more than we absolutely have to to make source ranges correct.


BTW to properly fix source ranges we need an answer to the previous
email from Enea:

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-March/013647.html

In two words we are asking if you're against to add the start source
location to Decl node (removing it from derived nodes that already have
one).

This is the only way we see to have proper source range for things like

const inline void f();






More information about the cfe-commits mailing list