Summary:
getAsInteger returns true on error. Oops.
No test because the behavior at the moment is identical with or without
this change.
Reviewers: tra
Subscribers: cfe-commits, Prazek
Differential Revision: https://reviews.llvm.org/D23340
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278733
91177308-0d34-0410-b5e6-
96231b3b80d8
int Major = -1, Minor = -1;
auto First = V.split('.');
auto Second = First.second.split('.');
- if (!First.first.getAsInteger(10, Major) ||
- !Second.first.getAsInteger(10, Minor))
+ if (First.first.getAsInteger(10, Major) ||
+ Second.first.getAsInteger(10, Minor))
return CudaVersion::UNKNOWN;
if (Major == 7 && Minor == 0) {