aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-05-10 02:30:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-05-10 02:30:28 +0000
commit42bc73a3f15f11f7178f99e669ab21d8a1e5e566 (patch)
treef9a07d38f5d3442ae4cc86b31e7621ae8558162b /llvm/lib/Support/APInt.cpp
parent9fc0ba970ab8226a4072aeed4e727473b463fbd5 (diff)
downloadllvm-42bc73a3f15f11f7178f99e669ab21d8a1e5e566.zip
llvm-42bc73a3f15f11f7178f99e669ab21d8a1e5e566.tar.gz
llvm-42bc73a3f15f11f7178f99e669ab21d8a1e5e566.tar.bz2
When we see a '<' operator, check whether it's a probable typo for a template-id.
The heuristic that we use here is: * the left-hand side must be a simple identifier or a class member access * the right-hand side must be '<' followed by either a '>' or by a type-id that cannot be an expression (in particular, not followed by '(' or '{') * there is a '>' token matching the '<' token The second condition guarantees the expression would otherwise be ill-formed. If we're confident that the user intended the name before the '<' to be interpreted as a template, diagnose the fact that we didn't interpret it that way, rather than diagnosing that the template arguments are not valid expressions. llvm-svn: 302615
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
0 files changed, 0 insertions, 0 deletions