r295172 - Use dedicated method instead of copying conditions. NFC.

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 15 04:30:35 PST 2017


Author: sepavloff
Date: Wed Feb 15 06:30:35 2017
New Revision: 295172

URL: http://llvm.org/viewvc/llvm-project?rev=295172&view=rev
Log:
Use dedicated method instead of copying conditions. NFC.

Modified:
    cfe/trunk/lib/AST/Decl.cpp

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=295172&r1=295171&r2=295172&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Wed Feb 15 06:30:35 2017
@@ -2503,7 +2503,7 @@ bool FunctionDecl::isVariadic() const {
 
 bool FunctionDecl::hasBody(const FunctionDecl *&Definition) const {
   for (auto I : redecls()) {
-    if (I->Body || I->IsLateTemplateParsed) {
+    if (I->doesThisDeclarationHaveABody()) {
       Definition = I;
       return true;
     }




More information about the cfe-commits mailing list