summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Doerfert <jdoerfert@anl.gov>2019-01-21 14:23:46 +0000
committerJohannes Doerfert <jdoerfert@anl.gov>2019-01-21 14:23:46 +0000
commite068d054e8df0f0fb9980265c16c80cf10fc2529 (patch)
tree3219ced579837831f6da81e3d4375f3a521592fd
parent67b7e23fa183e2496c27a83b8ba2b85238558487 (diff)
downloadbcm5719-llvm-e068d054e8df0f0fb9980265c16c80cf10fc2529.tar.gz
bcm5719-llvm-e068d054e8df0f0fb9980265c16c80cf10fc2529.zip
[NFC] Fix comparison warning issues by MSVC
llvm-svn: 351744
-rw-r--r--clang/lib/Sema/SemaDeclAttr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp
index c3726c226f6..5e9f27001d6 100644
--- a/clang/lib/Sema/SemaDeclAttr.cpp
+++ b/clang/lib/Sema/SemaDeclAttr.cpp
@@ -3560,7 +3560,9 @@ static void handleCallbackAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
int CalleeIdx = EncodingIndices.front();
// Check if the callee index is proper, thus not "this" and not "unknown".
- if (CalleeIdx < HasImplicitThisParam) {
+ // This means the "CalleeIdx" has to be non-negative if "HasImplicitThisParam"
+ // is false and positive if "HasImplicitThisParam" is true.
+ if (CalleeIdx < (int)HasImplicitThisParam) {
S.Diag(AL.getLoc(), diag::err_callback_attribute_invalid_callee)
<< AL.getRange();
return;
OpenPOWER on IntegriCloud