This revision was automatically updated to reflect the committed changes.
Closed by commit rL305021: [ASTMatchers] Add support for floatLiterals
(authored by Lekensteyn).
Changed prior to commit:
https://reviews.llvm.org/D33135?vs=101816&id=101968#toc
Repository:
rL LLVM
https://reviews.llv
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: include/clang/ASTMatchers/Dynamic/VariantValue.h:335
unsigned Unsigned;
+double Double;
bool Boolean;
Lekenstey
Lekensteyn added a comment.
Rebased patches on latest clang master (trunk), there were no changes in
ASTMatchers.
boolean literal patch was unchanged, this floating literal patch was updated to
address comments.
Comment at: include/clang/ASTMatchers/Dynamic/VariantValue.h:335
Lekensteyn updated this revision to Diff 101816.
Lekensteyn marked 8 inline comments as done.
Lekensteyn added a comment.
diff from previous version:
diff --git a/include/clang/ASTMatchers/Dynamic/Parser.h
b/include/clang/ASTMatchers/Dynamic/Parser.h
index 0d0c2ba540..5ec4a9abf4 100644
---
aaron.ballman added inline comments.
Comment at: include/clang/ASTMatchers/Dynamic/VariantValue.h:335
unsigned Unsigned;
+double Double;
bool Boolean;
Lekensteyn wrote:
> aaron.ballman wrote:
> > Lekensteyn wrote:
> > > aaron.ballman wrote:
> > > >
Lekensteyn added inline comments.
Comment at: include/clang/ASTMatchers/Dynamic/VariantValue.h:335
unsigned Unsigned;
+double Double;
bool Boolean;
aaron.ballman wrote:
> Lekensteyn wrote:
> > aaron.ballman wrote:
> > > This may or may not be a good
aaron.ballman added a comment.
In https://reviews.llvm.org/D33135#754278, @Lekensteyn wrote:
> By the way, I think that `long double` is less common than long unsigned
> literals, so changing unsigned to uint64_t might be something more important?
I agree that it's likely a more common use cas
Lekensteyn added a comment.
By the way, I think that `long double` is less common than long unsigned
literals, so changing unsigned to uint64_t might be something more important?
Comment at: include/clang/ASTMatchers/Dynamic/Parser.h:25
///:= true | false
+///
aaron.ballman added inline comments.
Comment at: include/clang/ASTMatchers/Dynamic/Parser.h:25
///:= true | false
+/// := 1.0 | 2e-3 | 3.45e67
/// := [0-9]+
It'd be good to list the actual grammar rather than a few examples.
Lekensteyn created this revision.
Needed to support something like "floatLiteral(equals(1.0))". The
parser for floating point numbers is kept simple, so instead of ".1" you
have to use "0.1".
https://reviews.llvm.org/D33135
Files:
include/clang/ASTMatchers/Dynamic/Diagnostics.h
include/clan
10 matches
Mail list logo