]> granicus.if.org Git - clang/commit
PR5683: Issue a warning when subtracting pointers to types of zero size, and
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 10 Sep 2013 21:34:14 +0000 (21:34 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 10 Sep 2013 21:34:14 +0000 (21:34 +0000)
commit812d6bcbd13190e6e5c2c915bf1499038d56b44b
treed3e3a38ed746a70b2bb7887763aa0d79d5257ed8
parent1507bf55c958bdd4b14a3ee49f66af874f179cf2
PR5683: Issue a warning when subtracting pointers to types of zero size, and
treat such subtractions as being non-constant. Patch by Serge Pavlov! With a
few tweaks by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190439 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticASTKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
lib/AST/ExprConstant.cpp
lib/Sema/SemaExpr.cpp
test/Sema/empty1.c
test/SemaCXX/constant-expression-cxx11.cpp