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

Csaba Raduly rcsaba at gmail.com
Thu Jan 8 00:44:20 PST 2015


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.

Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds



More information about the cfe-dev mailing list