r203397 - [C++11] Replacing some using declarations which are not supported on all compilers (such as MSVC 2012) with a less problematic typedef.

Aaron Ballman aaron at aaronballman.com
Sun Mar 9 05:59:45 PDT 2014


Author: aaronballman
Date: Sun Mar  9 07:59:45 2014
New Revision: 203397

URL: http://llvm.org/viewvc/llvm-project?rev=203397&view=rev
Log:
[C++11] Replacing some using declarations which are not supported on all compilers (such as MSVC 2012) with a less problematic typedef.

Modified:
    cfe/trunk/include/clang/AST/Decl.h
    cfe/trunk/include/clang/AST/DeclBase.h

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=203397&r1=203396&r2=203397&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Sun Mar  9 07:59:45 2014
@@ -2899,7 +2899,8 @@ public:
   // enumerator_iterator - Iterates through the enumerators of this
   // enumeration.
   typedef specific_decl_iterator<EnumConstantDecl> enumerator_iterator;
-  typedef specific_decl_range<EnumConstantDecl> enumerator_range;
+  typedef llvm::iterator_range<specific_decl_iterator<EnumConstantDecl>>
+    enumerator_range;
 
   enumerator_range enumerators() const {
     return enumerator_range(enumerator_begin(), enumerator_end());
@@ -3150,7 +3151,7 @@ public:
   // the non-static data members of this class, ignoring any static
   // data members, functions, constructors, destructors, etc.
   typedef specific_decl_iterator<FieldDecl> field_iterator;
-  typedef specific_decl_range<FieldDecl> field_range;
+  typedef llvm::iterator_range<specific_decl_iterator<FieldDecl>> field_range;
 
   field_range fields() const { return field_range(field_begin(), field_end()); }
   field_iterator field_begin() const;

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=203397&r1=203396&r2=203397&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Sun Mar  9 07:59:45 2014
@@ -1399,10 +1399,6 @@ public:
     }
   };
 
-  template <typename SpecificDecl>
-  using specific_decl_range =
-      llvm::iterator_range<specific_decl_iterator<SpecificDecl>>;
-
   /// \brief Iterates over a filtered subrange of declarations stored
   /// in a DeclContext.
   ///





More information about the cfe-commits mailing list