kuganv updated this revision to Diff 494870. kuganv added a comment. Rebasing branch.
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141950/new/ https://reviews.llvm.org/D141950 Files: clang/lib/AST/ASTContext.cpp Index: clang/lib/AST/ASTContext.cpp =================================================================== --- clang/lib/AST/ASTContext.cpp +++ clang/lib/AST/ASTContext.cpp @@ -348,7 +348,7 @@ // There should be no other declarations or preprocessor directives between // comment and declaration. - if (Text.find_first_of(";{}#@") != StringRef::npos) + if (Text.find_last_of(";{}#@") != StringRef::npos) return nullptr; return CommentBeforeDecl;
Index: clang/lib/AST/ASTContext.cpp =================================================================== --- clang/lib/AST/ASTContext.cpp +++ clang/lib/AST/ASTContext.cpp @@ -348,7 +348,7 @@ // There should be no other declarations or preprocessor directives between // comment and declaration. - if (Text.find_first_of(";{}#@") != StringRef::npos) + if (Text.find_last_of(";{}#@") != StringRef::npos) return nullptr; return CommentBeforeDecl;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits