aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index ca1fa0c1e1..387f79a013 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -271,6 +271,10 @@ unsigned FunctionDecl::getBuiltinID(ASTContext &Context) const {
// function. Determine whether it actually refers to the C library
// function or whether it just has the same name.
+ // If this is a static function, it's not a builtin.
+ if (getStorageClass() == Static)
+ return 0;
+
// If this function is at translation-unit scope and we're not in
// C++, it refers to the C library function.
if (!Context.getLangOptions().CPlusPlus &&