This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG44eee659f1c5: [AST] Print NTTP args as string-literals when
possible (authored by lichray).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE
lichray updated this revision to Diff 412289.
lichray added a comment.
Herald added a project: All.
- Add a trigraph test case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
Aside from a testing nit, this LGTM!
Comment at: clang/include/clang/Basic/CharInfo.h:199-200
+return "\\t";
+ case '\v':
+return "\\v";
+ }
lichray marked 4 inline comments as done.
lichray added inline comments.
Comment at: clang/include/clang/Basic/CharInfo.h:199-200
+return "\\t";
+ case '\v':
+return "\\v";
+ }
aaron.ballman wrote:
> lichray wrote:
> > aaron.ballman wrote:
> > > We're
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/CharInfo.h:199-200
+return "\\t";
+ case '\v':
+return "\\v";
+ }
lichray wrote:
> aaron.ballman wrote:
> > We're also missing `\?` right?
> `?` does not seem to need
lichray marked 3 inline comments as done.
lichray added inline comments.
Comment at: clang/include/clang/Basic/CharInfo.h:199-200
+return "\\t";
+ case '\v':
+return "\\v";
+ }
aaron.ballman wrote:
> We're also missing `\?` right?
`?` does not seem to
lichray updated this revision to Diff 411856.
lichray added a comment.
- Revert some auto's
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
aaron.ballman added inline comments.
Comment at: clang/include/clang/Basic/CharInfo.h:199-200
+return "\\t";
+ case '\v':
+return "\\v";
+ }
We're also missing `\?` right?
Comment at: clang/lib/AST/APValue.cpp:658
+ for (auto :
lichray updated this revision to Diff 408137.
lichray added a comment.
Rerun pre-merge checks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
lichray updated this revision to Diff 407464.
lichray added a comment.
Rebased
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
lichray updated this revision to Diff 403760.
lichray added a comment.
Rebased
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
lichray added a comment.
Ping.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
lichray marked an inline comment as done.
lichray added a comment.
Restricted the ellipsis only to diagnosis. Type comparison now shows full
initializers, which could be made smarter next time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
lichray updated this revision to Diff 402180.
lichray added a comment.
- Flip the default and set EntireContentsOfLargeArray off only in diagnosis
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
rsmith added inline comments.
Comment at: clang/include/clang/AST/PrettyPrinter.h:288
+ /// template parameters, no matter how many elements there are.
+ unsigned EntireContentsOfLargeArray : 1;
+
lichray wrote:
> rsmith wrote:
> > It looks like nothing is
lichray updated this revision to Diff 399433.
lichray added a comment.
Rebase
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
lichray updated this revision to Diff 399415.
lichray added a comment.
- clang-format
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
lichray updated this revision to Diff 396408.
lichray added a comment.
- Put tests in TypePrinterTest.cpp
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/include/clang/AST/DeclTemplate.h
lichray marked 2 inline comments as done.
lichray added inline comments.
Comment at: clang/include/clang/AST/PrettyPrinter.h:288
+ /// template parameters, no matter how many elements there are.
+ unsigned EntireContentsOfLargeArray : 1;
+
rsmith wrote:
> It
lichray updated this revision to Diff 396187.
lichray marked an inline comment as done.
lichray added a comment.
Herald added a subscriber: mgorny.
- Fix categorizing int64_t chars of negative values
- More ArrayRef
- Fix and test the EntireContentsOfLargeArray bit
Repository:
rG LLVM Github
rsmith added inline comments.
Comment at: clang/include/clang/AST/PrettyPrinter.h:288
+ /// template parameters, no matter how many elements there are.
+ unsigned EntireContentsOfLargeArray : 1;
+
It looks like nothing is setting this to `true` yet, so that
lichray added a comment.
@rsmith Ping. I'm all on you :) You are almost the only one designed these
files.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
___
lichray added a comment.
Ping. Ready to review again.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
lichray updated this revision to Diff 391833.
lichray marked an inline comment as done.
lichray added a comment.
- Switch to `llvm::SmallString`
- Refactor code that prints C-style builtin escape sequences
- Stop printing strings with embedded NULs in NTTP types
- Add an
lichray marked 5 inline comments as done.
lichray added inline comments.
Comment at: clang/lib/AST/APValue.cpp:637-639
+ // Nothing we can do about a sequence that is not null-terminated
+ if (!Data[--Size].getInt().isZero())
+return false;
lichray wrote:
lichray added inline comments.
Comment at: clang/lib/AST/APValue.cpp:637-639
+ // Nothing we can do about a sequence that is not null-terminated
+ if (!Data[--Size].getInt().isZero())
+return false;
lichray wrote:
> rsmith wrote:
> > lichray wrote:
> > >
lichray added inline comments.
Comment at: clang/lib/AST/APValue.cpp:637-639
+ // Nothing we can do about a sequence that is not null-terminated
+ if (!Data[--Size].getInt().isZero())
+return false;
rsmith wrote:
> lichray wrote:
> > rsmith wrote:
> > > We
rsmith added inline comments.
Comment at: clang/lib/AST/APValue.cpp:637-639
+ // Nothing we can do about a sequence that is not null-terminated
+ if (!Data[--Size].getInt().isZero())
+return false;
lichray wrote:
> rsmith wrote:
> > We should drop all
lichray added inline comments.
Comment at: clang/lib/AST/APValue.cpp:628-629
+static bool TryPrintAsStringLiteral(raw_ostream , const ArrayType *ATy,
+const APValue *Data, size_t Size) {
+ if (Size == 0)
rsmith wrote:
> Is
lichray updated this revision to Diff 391744.
lichray added a comment.
Ensure the ellipses output is never shorter than the normal ones (will look at
review comments later)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
rsmith added inline comments.
Comment at: clang/lib/AST/APValue.cpp:628-629
+static bool TryPrintAsStringLiteral(raw_ostream , const ArrayType *ATy,
+const APValue *Data, size_t Size) {
+ if (Size == 0)
Is there anything
lichray updated this revision to Diff 391718.
lichray added a comment.
Add EOL to source file
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/lib/AST/APValue.cpp
lichray updated this revision to Diff 391717.
lichray added a comment.
- Add tests
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/lib/AST/APValue.cpp
lichray updated this revision to Diff 391602.
lichray added a comment.
Restore deleted comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/lib/AST/APValue.cpp
Index:
lichray updated this revision to Diff 391600.
lichray added a comment.
Fix failed assertion
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115031/new/
https://reviews.llvm.org/D115031
Files:
clang/lib/AST/APValue.cpp
Index:
lichray created this revision.
lichray requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
C++20 NTTP (non-type template parameter) prints `MyType<{{116, 104, 105,
115}}>` when the code is as simple as `MyType<"this">`. Of course, due to the
36 matches
Mail list logo