This revision was automatically updated to reflect the committed changes.
Closed by commit rL248454: Improve the printing of ranges when macros are
involved. (authored by rtrieu).
Changed prior to commit:
http://reviews.llvm.org/D12379?vs=35575&id=35580#toc
Repository:
rL LLVM
http://review
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 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 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 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 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
rtrieu added inline comments.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:442
@@ -419,1 +441,3 @@
+static bool checkLocForMacroArgExpansion(SourceLocation Loc,
+ const SourceManager &SM,
zhengkai wrote:
> I have stated
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 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
rtrieu added inline comments.
Comment at: lib/Frontend/DiagnosticRenderer.cpp:455
@@ -419,1 +454,3 @@
+static bool checkLocForMacroArgExpansion(SourceLocation Loc,
+ const SourceManager &SM,
rtrieu wrote:
> zhengkai wrote:
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 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:
rtrieu added inline comments.
Comment at: lib/Basic/SourceManager.cpp:1008
@@ -1008,1 +1007,3 @@
+bool SourceManager::isMacroArgExpansion(SourceLocation Loc,
+ SourceLocation *NewLoc) const {
if (!Loc.isMacroID()) return false;
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:312
@@ +311,3 @@
+
+static bool retrieveBeginLocation(SourceLocation &Begin,
+ FileID &BeginFileID,
rtrieu wrote:
> Why not return a SourceLocation instead
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
rtrieu added inline comments.
Comment at: include/clang/Basic/SourceManager.h:333
@@ -332,2 +332,3 @@
+
bool isMacroBodyExpansion() const {
Remove unrelated whitespace change.
Comment at: include/clang/Basic/SourceManager.h:1155-1164
@@ -1
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 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
rtrieu added a comment.
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://reviews.llvm.org/D12379#245849, @rtrieu wrote:
> > >
> > > > Why are y
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?
> > >
rtrieu added a comment.
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?
> > This is an internal implementation detail and should not be relied on
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
rtrieu added a comment.
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 locations.
http://reviews.llvm.org/D12379
__
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 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/
26 matches
Mail list logo