summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Builtins.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-02-26 05:39:39 +0000
committerJohn McCall <rjmccall@apple.com>2011-02-26 05:39:39 +0000
commit8e10f3b9cc1db43645bbc2999eb163af8997d468 (patch)
treec568c54b4602aac488863782ff687051f7277aee /include/clang/Basic/Builtins.h
parentdff3f018e0bf93a08f135954a5771bfe664a7744 (diff)
Provide a bit saying that a builtin undergoes custom type-checking, then
don't let calls to such functions go down the normal type-checking path. Test this out with __builtin_classify_type and __builtin_constant_p. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/Builtins.h')
-rw-r--r--include/clang/Basic/Builtins.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/Builtins.h b/include/clang/Basic/Builtins.h
index 4df4c8f953..0d17e03d8a 100644
--- a/include/clang/Basic/Builtins.h
+++ b/include/clang/Basic/Builtins.h
@@ -117,6 +117,11 @@ public:
return strchr(GetRecord(ID).Attributes, 'f') != 0;
}
+ /// \brief Determines whether this builtin has custom typechecking.
+ bool hasCustomTypechecking(unsigned ID) const {
+ return strchr(GetRecord(ID).Attributes, 't') != 0;
+ }
+
/// \brief Completely forget that the given ID was ever considered a builtin,
/// e.g., because the user provided a conflicting signature.
void ForgetBuiltin(unsigned ID, IdentifierTable &Table);