zhengkai added a comment.
The helper function checkRangesForMacroArgExpansion is to check if the current
Loc and Ranges are expansions of a macro's arguments.
If so, the IgnoredEnd will record this position and thus omitting all later
expanded macros (Later expanded macros are showed on top of
zhengkai added a comment.
The example our method doesn't work: https://llvm.org/bugs/show_bug.cgi?id=24424
http://reviews.llvm.org/D11778
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
zhengkai created this revision.
zhengkai added a reviewer: rtrieu.
zhengkai added a subscriber: cfe-commits.
Use a new algorithm to find map back the ranges to its spelling locations.
But the function is not working properly either, and it breaks a test.
In the last case in the test file
zhengkai added a comment.
In http://reviews.llvm.org/D12379#245849, @rtrieu wrote:
> Why are you leaking the raw encoding of locations from the SourceManager?
> This is an internal implementation detail and should not be relied on
> externally. SourceLocation is the typical way to use
zhengkai added a comment.
In http://reviews.llvm.org/D12379#245861, @rtrieu wrote:
> In http://reviews.llvm.org/D12379#245850, @zhengkai wrote:
>
> > In http://reviews.llvm.org/D12379#245849, @rtrieu wrote:
> >
> > > Why are you leaking the raw encoding of locations from the SourceManager?
> >
zhengkai added a comment.
In http://reviews.llvm.org/D12379#245892, @rtrieu wrote:
> In http://reviews.llvm.org/D12379#245868, @zhengkai wrote:
>
> > In http://reviews.llvm.org/D12379#245861, @rtrieu wrote:
> >
> > > In http://reviews.llvm.org/D12379#245850, @zhengkai wrote:
> > >
> > > > In
zhengkai updated this revision to Diff 34943.
zhengkai marked 8 inline comments as done.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test/Index/fix-its.m
test/Misc/caret-diags-macros.c
zhengkai added inline comments.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:312
@@ +311,3 @@
+
+static bool retrieveBeginLocation(SourceLocation ,
+ FileID ,
rtrieu wrote:
> Why not return a SourceLocation instead of passing one in
zhengkai marked 2 inline comments as done.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:455
@@ -419,1 +454,3 @@
+static bool checkLocForMacroArgExpansion(SourceLocation Loc,
+ const SourceManager ,
Because the function
zhengkai updated this revision to Diff 35561.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test/Index/fix-its.m
test/Misc/caret-diags-macros.c
test/Misc/diag-macro-backtrace2.c
zhengkai added inline comments.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:442
@@ -419,1 +441,3 @@
+/// Check if the current location fit in the macro argument expansion
+/// Especially, it should fit in the same argument with all the other locations
zhengkai updated this revision to Diff 35556.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test/Index/fix-its.m
test/Misc/caret-diags-macros.c
test/Misc/diag-macro-backtrace2.c
zhengkai marked an inline comment as done.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:442
@@ -419,1 +441,3 @@
+static bool checkLocForMacroArgExpansion(SourceLocation Loc,
+ const SourceManager ,
I have stated that I
zhengkai updated this revision to Diff 35554.
zhengkai marked 11 inline comments as done.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test/Index/fix-its.m
test/Misc/caret-diags-macros.c
zhengkai updated this revision to Diff 35574.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test/Index/fix-its.m
test/Misc/caret-diags-macros.c
test/Misc/diag-macro-backtrace2.c
zhengkai updated this revision to Diff 35573.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test/Index/fix-its.m
test/Misc/caret-diags-macros.c
test/Misc/diag-macro-backtrace2.c
16 matches
Mail list logo