[PATCH] D80508: [AST] Fix the source range for TagDecl if there is no matched } brace.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/AST/Decl.cpp:4129 SourceRange TagDecl::getSourceRange() const { - SourceLocation RBraceLoc = BraceRange.getEnd(); - SourceLocation E = RBraceLoc.isValid() ? RBraceLoc : getLocation();

[PATCH] D80508: [AST] Fix the source range for TagDecl if there is no matched } brace.

2020-05-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/AST/Decl.cpp:4129 SourceRange TagDecl::getSourceRange() const { - SourceLocation RBraceLoc = BraceRange.getEnd(); - SourceLocation E = RBraceLoc.isValid() ? RBraceLoc : getLocation(); + SourceLocation E = BraceRange.getBe

[PATCH] D80508: [AST] Fix the source range for TagDecl if there is no matched } brace.

2020-05-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/AST/Decl.cpp:4129 SourceRange TagDecl::getSourceRange() const { - SourceLocation RBraceLoc = BraceRange.getEnd(); - SourceLocation E = RBraceLoc.isValid() ? RBraceLoc : getLocation();

[PATCH] D80508: [AST] Fix the source range for TagDecl if there is no matched } brace.

2020-05-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Argh I never submitted these comments, sorry. Comment at: clang/lib/AST/Decl.cpp:4129 SourceRange TagDecl::getSourceRange() const { - SourceLocation RBraceLoc = BraceRange.getEnd(); - SourceLocation E = RBraceLoc.isValid() ? RBraceLoc : getLocation

[PATCH] D80508: [AST] Fix the source range for TagDecl if there is no matched } brace.

2020-05-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, akyrtzi. Herald added subscribers: usaxena95, kadircet, arphaman, dexonsmith, jkorous, ilya-biryukov. Herald added a project: clang. The AST is preserved when the TagDecl misses a } brace, but the source range seems incorrect (just