r212154 - Introduce a FunctionDecl::getReturnTypeSourceRange() utility

Alp Toker alp at nuanti.com
Tue Jul 1 23:39:57 PDT 2014


On 02/07/2014 09:24, Tobias Grosser wrote:
> On 02/07/2014 03:47, Alp Toker wrote:
>> Author: alp
>> Date: Tue Jul  1 20:47:15 2014
>> New Revision: 212154
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=212154&view=rev
>> Log:
>> Introduce a FunctionDecl::getReturnTypeSourceRange() utility
>>
>> This source range is useful for all kinds of diagnostic QOI and 
>> refactoring
>> work, so let's make it more discoverable.
>>
>> This commit also makes use of the new function to enhance various 
>> diagnostics
>> relating to return types and resolves an old FIXME.
>>
>> Modified:
>>      cfe/trunk/include/clang/AST/Decl.h
>>      cfe/trunk/lib/AST/Decl.cpp
>>      cfe/trunk/lib/Sema/SemaDecl.cpp
>>      cfe/trunk/lib/Sema/SemaDeclCXX.cpp
>
> This does not affect any test cases? No test case that could be added?

It just moved an existing function and added source informative source 
locations which we don't usually test.

We probably *should* test the locations though, there are problems with 
type locations stored in the AST that need fixing, so will look into it.

Alp.

-- 
http://www.nuanti.com
the browser experts




More information about the cfe-commits mailing list