aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 7eedd0b07f..0b7c33ff98 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1845,13 +1845,13 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
isVirtualOkay = (SC != FunctionDecl::Static);
} else {
+ bool HasPrototype =
+ getLangOptions().CPlusPlus ||
+ (D.getNumTypeObjects() && D.getTypeObject(0).Fun.hasPrototype);
+
NewFD = FunctionDecl::Create(Context, DC,
D.getIdentifierLoc(),
- Name, R, SC, isInline,
- /*hasPrototype=*/
- (getLangOptions().CPlusPlus ||
- (D.getNumTypeObjects() &&
- D.getTypeObject(0).Fun.hasPrototype)),
+ Name, R, SC, isInline, HasPrototype,
// FIXME: Move to DeclGroup...
D.getDeclSpec().getSourceRange().getBegin());
}