summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/AST/Decl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 1e98998002f..ec11838c847 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1478,7 +1478,7 @@ bool FunctionDecl::isMain() const {
const TranslationUnitDecl *tunit =
dyn_cast<TranslationUnitDecl>(getDeclContext()->getRedeclContext());
return tunit &&
- tunit->getASTContext().getLangOptions().Freestanding &&
+ !tunit->getASTContext().getLangOptions().Freestanding &&
getIdentifier() &&
getIdentifier()->isStr("main");
}
OpenPOWER on IntegriCloud