aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-02-21 02:32:34 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-02-21 02:32:34 +0000
commit4a3012d4dd9748b18b53b90e855989d98308f990 (patch)
tree07e2a396e7eb9517925158cadcdc3cb70b069a9a /tools
parent9f6e9106176008e91af6a974b3cf31c064d6d884 (diff)
CIndex.cpp: Appease g++-4.4. "if (Optional<unsigned> Minor = In.getMinor())" did not work as expected.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175711 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/CIndex.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index 669bb8722e..3d81660b4d 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -5741,12 +5741,14 @@ static CXVersion convertVersion(VersionTuple In) {
Out.Major = In.getMajor();
- if (Optional<unsigned> Minor = In.getMinor())
+ Optional<unsigned> Minor = In.getMinor();
+ if (Minor.hasValue())
Out.Minor = *Minor;
else
return Out;
- if (Optional<unsigned> Subminor = In.getSubminor())
+ Optional<unsigned> Subminor = In.getSubminor();
+ if (Subminor.hasValue())
Out.Subminor = *Subminor;
return Out;