From: NAKAMURA Takumi Date: Thu, 21 Feb 2013 02:32:34 +0000 (+0000) Subject: CIndex.cpp: Appease g++-4.4. "if (Optional Minor = In.getMinor())" did... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4a3012d4dd9748b18b53b90e855989d98308f990;p=clang CIndex.cpp: Appease g++-4.4. "if (Optional 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 --- 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 Minor = In.getMinor()) + Optional Minor = In.getMinor(); + if (Minor.hasValue()) Out.Minor = *Minor; else return Out; - if (Optional Subminor = In.getSubminor()) + Optional Subminor = In.getSubminor(); + if (Subminor.hasValue()) Out.Subminor = *Subminor; return Out;