[cfe-commits] r116145 - in /cfe/trunk: include/clang/Basic/Builtins.def test/Sema/i-c-e.c
Abramo Bagnara
abramo.bagnara at gmail.com
Fri Oct 8 21:51:06 PDT 2010
Author: abramo
Date: Fri Oct 8 23:51:06 2010
New Revision: 116145
URL: http://llvm.org/viewvc/llvm-project?rev=116145&view=rev
Log:
Fixed __builtin_constant_p return type.
Modified:
cfe/trunk/include/clang/Basic/Builtins.def
cfe/trunk/test/Sema/i-c-e.c
Modified: cfe/trunk/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=116145&r1=116144&r2=116145&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def (original)
+++ cfe/trunk/include/clang/Basic/Builtins.def Fri Oct 8 23:51:06 2010
@@ -288,7 +288,7 @@
BUILTIN(__builtin_bswap64, "ULLiULLi", "nc")
// Random GCC builtins
-BUILTIN(__builtin_constant_p, "Us.", "nc")
+BUILTIN(__builtin_constant_p, "is.", "nc")
BUILTIN(__builtin_classify_type, "i.", "nc")
BUILTIN(__builtin___CFStringMakeConstantString, "FC*cC*", "nc")
BUILTIN(__builtin___NSStringMakeConstantString, "FC*cC*", "nc")
Modified: cfe/trunk/test/Sema/i-c-e.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/i-c-e.c?rev=116145&r1=116144&r2=116145&view=diff
==============================================================================
--- cfe/trunk/test/Sema/i-c-e.c (original)
+++ cfe/trunk/test/Sema/i-c-e.c Fri Oct 8 23:51:06 2010
@@ -9,6 +9,7 @@
int expr;
char w[__builtin_constant_p(expr) ? expr : 1];
+char v[sizeof(__builtin_constant_p(0)) == sizeof(int) ? 1 : -1];
// __builtin_constant_p as the condition of ?: allows arbitrary foldable
// constants to be transmogrified into i-c-e's.
More information about the cfe-commits
mailing list