]> granicus.if.org Git - clang/commit
Modern gcc is happy to constant evaluate __builtin_strlen in various cases
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 15 Nov 2013 02:10:04 +0000 (02:10 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 15 Nov 2013 02:10:04 +0000 (02:10 +0000)
commite21432efa94079aa1a62f7d5ff3b47a92d3c8296
tree967d67e82d4b858f3534543187138a06def3b629
parent0de6bc8ea32e2813aac5f98c348ce735a5bdca08
Modern gcc is happy to constant evaluate __builtin_strlen in various cases
where we didn't. Extend our constant evaluation for __builtin_strlen to handle
any constant array of chars, not just string literals, to match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194762 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/ExprConstant.cpp
test/SemaCXX/constant-expression-cxx11.cpp