summaryrefslogtreecommitdiffstats
path: root/clang/lib
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
commit441914ea5b4c404eb035f78b6e61fc55f28571ab (patch)
tree70d86b379c8e5f590e5258d49f53c8a0a8e2ae41 /clang/lib
parent9363e3106edc4b5d67eebb5bcebc8d0176cb2b35 (diff)
downloadbcm5719-llvm-441914ea5b4c404eb035f78b6e61fc55f28571ab.tar.gz
bcm5719-llvm-441914ea5b4c404eb035f78b6e61fc55f28571ab.zip
pull a nested conditional + comment out into its own variable,
no functionality change. llvm-svn: 67128
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 7eedd0b07f8..0b7c33ff987 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/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());
}
OpenPOWER on IntegriCloud