r201621 - Remove a C++11ism.

Richard Smith richard-llvm at metafoo.co.uk
Tue Feb 18 17:08:24 PST 2014


Author: rsmith
Date: Tue Feb 18 19:08:24 2014
New Revision: 201621

URL: http://llvm.org/viewvc/llvm-project?rev=201621&view=rev
Log:
Remove a C++11ism.

Modified:
    cfe/trunk/lib/Sema/SemaType.cpp

Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=201621&r1=201620&r2=201621&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Tue Feb 18 19:08:24 2014
@@ -1129,10 +1129,11 @@ static QualType ConvertDeclSpecToType(Ty
         TypeQuals && Result->isReferenceType()) {
       // If this occurs outside a template instantiation, warn the user about
       // it; they probably didn't mean to specify a redundant qualifier.
-      std::pair<DeclSpec::TQ, SourceLocation> Quals[] = {
-        { DeclSpec::TQ_const, DS.getConstSpecLoc() },
-        { DeclSpec::TQ_volatile, DS.getVolatileSpecLoc() },
-        { DeclSpec::TQ_atomic, DS.getAtomicSpecLoc() }
+      typedef std::pair<DeclSpec::TQ, SourceLocation> QualLoc;
+      QualLoc Quals[] = {
+        QualLoc(DeclSpec::TQ_const, DS.getConstSpecLoc()),
+        QualLoc(DeclSpec::TQ_volatile, DS.getVolatileSpecLoc()),
+        QualLoc(DeclSpec::TQ_atomic, DS.getAtomicSpecLoc())
       };
       for (unsigned I = 0, N = llvm::array_lengthof(Quals); I != N; ++I) {
         if (S.ActiveTemplateInstantiations.empty()) {





More information about the cfe-commits mailing list