zhengkai updated the summary for this revision.
zhengkai updated this revision to Diff 34588.
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
t
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 locatio
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 updated this revision to Diff 34826.
zhengkai added a comment.
Use the rtrieu's method to re write the implementation of SourceManager.
http://reviews.llvm.org/D12379
Files:
include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp
lib/Frontend/DiagnosticRenderer.cpp
test
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 http
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
test/M
zhengkai added inline comments.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:312
@@ +311,3 @@
+
+static bool retrieveBeginLocation(SourceLocation &Begin,
+ FileID &BeginFileID,
rtrieu wrote:
> Why not return a SourceLocation instead
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 &SM,
Because the functi
zhengkai added inline comments.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:323
@@ +322,3 @@
+ else
+Backup = SM->getImmediateSpellingLoc(Backup);
+
rtrieu wrote:
> You did not add that here.
The getImmediateMacroCallerLoc is implemented as following:
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
test/
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
test/Misc/red
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 &SM,
I have stated that
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
test/Misc/red
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
Explai
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
test/Misc/red
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
test/Misc/red
zhengkai updated this revision to Diff 35575.
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
test/Misc/red
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 t
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
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
/llvm/
20 matches
Mail list logo