Author: Simon Pilgrim
Date: 2020-02-04T21:36:50Z
New Revision: 17785cc7a105a56900ed827979336944ccfa8c9d

URL: 
https://github.com/llvm/llvm-project/commit/17785cc7a105a56900ed827979336944ccfa8c9d
DIFF: 
https://github.com/llvm/llvm-project/commit/17785cc7a105a56900ed827979336944ccfa8c9d.diff

LOG: [clang-tidy] Fix "expression is redundant [misc-redundant-expression]" 
warning. NFCI. (PR44768)

We only accept tok::TokenKind::comment enum values so no need to add other 
cases. Seems to be a cut+paste typo.

Added: 
    

Modified: 
    clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp

Removed: 
    


################################################################################
diff  --git 
a/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp 
b/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
index da0bef32c091..64e182bbbbc8 100644
--- a/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/BracesAroundStatementsCheck.cpp
@@ -42,7 +42,7 @@ SourceLocation 
forwardSkipWhitespaceAndComments(SourceLocation Loc,
       Loc = Loc.getLocWithOffset(1);
 
     tok::TokenKind TokKind = getTokenKind(Loc, SM, Context);
-    if (TokKind == tok::NUM_TOKENS || TokKind != tok::comment)
+    if (TokKind != tok::comment)
       return Loc;
 
     // Fast-forward current token.


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to