aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-17 23:17:04 +0000
committerChris Lattner <sabre@nondot.org>2009-03-17 23:17:04 +0000
commit0d48bf9eb5eee5b75b413098c84b5170ca84a62e (patch)
tree2044c4dd5b3eb479c1a09cfcf01c38060c5977cc /lib/Sema/SemaDecl.cpp
parent897cd90fef4cd5139999585f3af31d85c2d07720 (diff)
pull a nested conditional + comment out into its own variable,
no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67128 91177308-0d34-0410-b5e6-96231b3b80d8
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());
}