[cfe-dev] How to create a SourceLocation from line number?

Richard Smith richard at metafoo.co.uk
Thu Jan 8 17:35:22 PST 2015


On Thu, Jan 8, 2015 at 1:14 PM, Sean Silva <chisophugis at gmail.com> wrote:

>
>
> On Thu, Jan 8, 2015 at 12:44 AM, Csaba Raduly <rcsaba at gmail.com> wrote:
>
>> On Wed, Jan 7, 2015 at 10:22 PM, Sean Silva <chisophugis at gmail.com>
>> wrote:
>> > Does SourceManager::translateFileLineCol work for you?
>> >
>> >
>> http://clang.llvm.org/doxygen/classclang_1_1SourceManager.html#a5573aab1578a194e43c7934e6902aeec
>>
>> Which says:
>> "
>> If the source file is included multiple times, the source location
>> will be based upon the first inclusion.
>> If the source file is included multiple times, the source location
>> will be based upon an arbitrary inclusion.
>> "
>>
>> These two sentences contradict each other.
>>
>>
> Indeed. Which one is it?
>

... and that's why you don't duplicate function comments between header and
source file. =)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150108/ad5d3cfb/attachment.html>


More information about the cfe-dev mailing list