]> granicus.if.org Git - clang/commitdiff
Normalize line endings
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 2 Mar 2014 18:46:05 +0000 (18:46 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 2 Mar 2014 18:46:05 +0000 (18:46 +0000)
Some files had CRLF line terminators, some only had a mixture of
CRLF and LF.  Switch to LF.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202659 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
include/clang/Sema/ScopeInfo.h
include/clang/Sema/SemaInternal.h
include/clang/Sema/SemaLambda.h
lib/AST/ASTDiagnostic.cpp
lib/Sema/SemaTemplateInstantiate.cpp
test/Analysis/NewDeleteLeaks-PR18394.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
test/CodeGenCXX/microsoft-new.cpp
test/FixIt/fixit-include.h
test/SemaCXX/abstract.cpp
test/SemaCXX/cxx-altivec.cpp
test/SemaTemplate/ms-if-exists.cpp

index e2231a5983c977d1a0aee7b1006ba84b788d6577..98af3715bfa70f5b53cd6540ae0371a866366916 100644 (file)
@@ -727,10 +727,10 @@ public:
   /// act of analyzing the enclosing full expression (ActOnFinishFullExpr)
   /// if we can determine that the full expression is not instantiation-
   /// dependent, then we can entirely avoid its capture. 
-  ///\r
-  ///   const int n = 0;\r
-  ///   [&] (auto x) {\r
-  ///     (void)+n + x;\r
+  ///
+  ///   const int n = 0;
+  ///   [&] (auto x) {
+  ///     (void)+n + x;
   ///   };
   /// Interestingly, this strategy would involve a capture of n, even though 
   /// it's obviously not odr-used here, because the full-expression is 
@@ -744,12 +744,12 @@ public:
   /// Before anyone is tempted to implement a strategy for not-capturing 'n',
   /// consider the insightful warning in: 
   ///    /cfe-commits/Week-of-Mon-20131104/092596.html
-  /// "The problem is that the set of captures for a lambda is part of the ABI\r
-  ///  (since lambda layout can be made visible through inline functions and the\r
-  ///  like), and there are no guarantees as to which cases we'll manage to build\r
-  ///  an lvalue-to-rvalue conversion in, when parsing a template -- some\r
-  ///  seemingly harmless change elsewhere in Sema could cause us to start or stop\r
-  ///  building such a node. So we need a rule that anyone can implement and get\r
+  /// "The problem is that the set of captures for a lambda is part of the ABI
+  ///  (since lambda layout can be made visible through inline functions and the
+  ///  like), and there are no guarantees as to which cases we'll manage to build
+  ///  an lvalue-to-rvalue conversion in, when parsing a template -- some
+  ///  seemingly harmless change elsewhere in Sema could cause us to start or stop
+  ///  building such a node. So we need a rule that anyone can implement and get
   ///  exactly the same result".
   ///    
   void markVariableExprAsNonODRUsed(Expr *CapturingVarExpr) {
index 01d4cc9679efdd4b3e7e311e4d6a9d15c2e80a84..0b3d32b25ca52d6f578e4fa2b2af40f1afa0f300 100644 (file)
@@ -24,43 +24,43 @@ namespace clang {
 inline PartialDiagnostic Sema::PDiag(unsigned DiagID) {
   return PartialDiagnostic(DiagID, Context.getDiagAllocator());
 }
-\r
-\r
-// This requires the variable to be non-dependent and the initializer\r
-// to not be value dependent.\r
-inline bool IsVariableAConstantExpression(VarDecl *Var, ASTContext &Context) {\r
-  const VarDecl *DefVD = 0;\r
-  return !isa<ParmVarDecl>(Var) &&\r
-    Var->isUsableInConstantExpressions(Context) &&\r
-    Var->getAnyInitializer(DefVD) && DefVD->checkInitIsICE(); \r
-}\r
-\r
-// Directly mark a variable odr-used. Given a choice, prefer to use \r
-// MarkVariableReferenced since it does additional checks and then \r
-// calls MarkVarDeclODRUsed.\r
-// If the variable must be captured:\r
-//  - if FunctionScopeIndexToStopAt is null, capture it in the CurContext\r
-//  - else capture it in the DeclContext that maps to the \r
-//    *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.  \r
-inline void MarkVarDeclODRUsed(VarDecl *Var,\r
-    SourceLocation Loc, Sema &SemaRef,\r
-    const unsigned *const FunctionScopeIndexToStopAt) {\r
-  // Keep track of used but undefined variables.\r
-  // FIXME: We shouldn't suppress this warning for static data members.\r
-  if (Var->hasDefinition(SemaRef.Context) == VarDecl::DeclarationOnly &&\r
-    !Var->isExternallyVisible() &&\r
-    !(Var->isStaticDataMember() && Var->hasInit())) {\r
-      SourceLocation &old = SemaRef.UndefinedButUsed[Var->getCanonicalDecl()];\r
-      if (old.isInvalid()) old = Loc;\r
-  }\r
-  QualType CaptureType, DeclRefType;\r
-  SemaRef.tryCaptureVariable(Var, Loc, Sema::TryCapture_Implicit, \r
-    /*EllipsisLoc*/ SourceLocation(),\r
-    /*BuildAndDiagnose*/ true, \r
-    CaptureType, DeclRefType, \r
-    FunctionScopeIndexToStopAt);\r
-\r
-  Var->markUsed(SemaRef.Context);\r
+
+
+// This requires the variable to be non-dependent and the initializer
+// to not be value dependent.
+inline bool IsVariableAConstantExpression(VarDecl *Var, ASTContext &Context) {
+  const VarDecl *DefVD = 0;
+  return !isa<ParmVarDecl>(Var) &&
+    Var->isUsableInConstantExpressions(Context) &&
+    Var->getAnyInitializer(DefVD) && DefVD->checkInitIsICE(); 
+}
+
+// Directly mark a variable odr-used. Given a choice, prefer to use 
+// MarkVariableReferenced since it does additional checks and then 
+// calls MarkVarDeclODRUsed.
+// If the variable must be captured:
+//  - if FunctionScopeIndexToStopAt is null, capture it in the CurContext
+//  - else capture it in the DeclContext that maps to the 
+//    *FunctionScopeIndexToStopAt on the FunctionScopeInfo stack.  
+inline void MarkVarDeclODRUsed(VarDecl *Var,
+    SourceLocation Loc, Sema &SemaRef,
+    const unsigned *const FunctionScopeIndexToStopAt) {
+  // Keep track of used but undefined variables.
+  // FIXME: We shouldn't suppress this warning for static data members.
+  if (Var->hasDefinition(SemaRef.Context) == VarDecl::DeclarationOnly &&
+    !Var->isExternallyVisible() &&
+    !(Var->isStaticDataMember() && Var->hasInit())) {
+      SourceLocation &old = SemaRef.UndefinedButUsed[Var->getCanonicalDecl()];
+      if (old.isInvalid()) old = Loc;
+  }
+  QualType CaptureType, DeclRefType;
+  SemaRef.tryCaptureVariable(Var, Loc, Sema::TryCapture_Implicit, 
+    /*EllipsisLoc*/ SourceLocation(),
+    /*BuildAndDiagnose*/ true, 
+    CaptureType, DeclRefType, 
+    FunctionScopeIndexToStopAt);
+
+  Var->markUsed(SemaRef.Context);
 }
 }
 
index df0a149133766f1f2ce17160d29499d1703a4c68..f6367505f866c45b1c3b1d3181affe7dd6027488 100644 (file)
@@ -1,36 +1,36 @@
-//===--- SemaLambda.h - Lambda Helper Functions --------------*- C++ -*-===//\r
-//\r
-//                     The LLVM Compiler Infrastructure\r
-//\r
-// This file is distributed under the University of Illinois Open Source\r
-// License. See LICENSE.TXT for details.\r
-//\r
-//===----------------------------------------------------------------------===//\r
-///\r
-/// \file\r
-/// \brief This file provides some common utility functions for processing\r
-/// Lambdas.\r
-///\r
-//===----------------------------------------------------------------------===//\r
-\r
-#ifndef LLVM_CLANG_SEMA_LAMBDA_H\r
-#define LLVM_CLANG_SEMA_LAMBDA_H\r
-#include "clang/AST/ASTLambda.h"\r
-#include "clang/Sema/ScopeInfo.h"\r
-namespace clang {\r
\r
-\r
-/// \brief Examines the FunctionScopeInfo stack to determine the nearest\r
-/// enclosing lambda (to the current lambda) that is 'capture-capable' for \r
-/// the variable referenced in the current lambda (i.e. \p VarToCapture).\r
-/// If successful, returns the index into Sema's FunctionScopeInfo stack\r
-/// of the capture-capable lambda's LambdaScopeInfo. \r
-/// See Implementation for more detailed comments. \r
-\r
-Optional<unsigned> getStackIndexOfNearestEnclosingCaptureCapableLambda(\r
-    ArrayRef<const sema::FunctionScopeInfo *> FunctionScopes,\r
-    VarDecl *VarToCapture, Sema &S);\r
-\r
-} // clang\r
-\r
-#endif // LLVM_CLANG_SEMA_LAMBDA_H\r
+//===--- SemaLambda.h - Lambda Helper Functions --------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// \brief This file provides some common utility functions for processing
+/// Lambdas.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_SEMA_LAMBDA_H
+#define LLVM_CLANG_SEMA_LAMBDA_H
+#include "clang/AST/ASTLambda.h"
+#include "clang/Sema/ScopeInfo.h"
+namespace clang {
+
+/// \brief Examines the FunctionScopeInfo stack to determine the nearest
+/// enclosing lambda (to the current lambda) that is 'capture-capable' for 
+/// the variable referenced in the current lambda (i.e. \p VarToCapture).
+/// If successful, returns the index into Sema's FunctionScopeInfo stack
+/// of the capture-capable lambda's LambdaScopeInfo. 
+/// See Implementation for more detailed comments. 
+
+Optional<unsigned> getStackIndexOfNearestEnclosingCaptureCapableLambda(
+    ArrayRef<const sema::FunctionScopeInfo *> FunctionScopes,
+    VarDecl *VarToCapture, Sema &S);
+
+} // clang
+
+#endif // LLVM_CLANG_SEMA_LAMBDA_H
index f3c2b224e1df98154e45592526c3b0803965cfd0..7c6bec4503f32f02ca704bc97431509cbc18f338 100644 (file)
@@ -360,13 +360,13 @@ void clang::FormatASTNodeDiagnosticArgument(
       NeedQuotes = false;
       break;
     }
-    case DiagnosticsEngine::ak_attr: {\r
-      const Attr *At = reinterpret_cast<Attr *>(Val);\r
-      assert(At && "Received null Attr object!");\r
-      OS << '\'' << At->getSpelling() << '\'';\r
-      NeedQuotes = false;\r
-      break;\r
-    }\r
+    case DiagnosticsEngine::ak_attr: {
+      const Attr *At = reinterpret_cast<Attr *>(Val);
+      assert(At && "Received null Attr object!");
+      OS << '\'' << At->getSpelling() << '\'';
+      NeedQuotes = false;
+      break;
+    }
 
   }
 
index 20f3a1adb685f2f9e96f5dd6bcfa99be45095260..0fdf48ba74c434639b07d0e435b9efbaf719be00 100644 (file)
@@ -950,7 +950,7 @@ namespace {
       return inherited::TransformLambdaScope(E, NewCallOperator, 
           InitCaptureExprsAndTypes);
     }
-    TemplateParameterList *TransformTemplateParameterList(\r
+    TemplateParameterList *TransformTemplateParameterList(
                               TemplateParameterList *OrigTPL)  {
       if (!OrigTPL || !OrigTPL->size()) return OrigTPL;
          
index 452781d07a5bd135473ab185cbbd5b248e883894..dfd94561628f87ce3228b3f748ab9a8e7b56797c 100644 (file)
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDeleteLeaks -verify %s\r
-// expected-no-diagnostics\r
-\r
-class A {\r
-public:\r
-  void f() {};\r
-  ~A() {\r
-    for (int i=0; i<3; i++)\r
-      f();\r
-  }\r
-};\r
-\r
-void error() {\r
-  A *a = new A();\r
-  delete a;\r
-}\r
+// RUN: %clang_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDeleteLeaks -verify %s
+// expected-no-diagnostics
+
+class A {
+public:
+  void f() {};
+  ~A() {
+    for (int i=0; i<3; i++)
+      f();
+  }
+};
+
+void error() {
+  A *a = new A();
+  delete a;
+}
index d41c4507a8502ad25efb9f2762d870a31dea83f7..03147a692dd546b7bf0823dcb429dcea1f178220 100644 (file)
@@ -1,25 +1,25 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y\r
-\r
-// prvalue\r
-void prvalue() {\r
-  auto&& x = [](auto a)->void { };\r
-  auto& y = [](auto *a)->void { }; // expected-error{{cannot bind to a temporary of type}}\r
-}\r
-\r
-namespace std {\r
-  class type_info;\r
-}\r
-\r
-struct P {\r
-  virtual ~P();\r
-};\r
-\r
-void unevaluated_operand(P &p, int i) { //expected-note{{declared here}}\r
-  // FIXME: this should only emit one error.\r
-  int i2 = sizeof([](auto a, auto b)->void{}(3, '4')); // expected-error{{lambda expression in an unevaluated operand}} \\r
-                                                       // expected-error{{invalid application of 'sizeof'}}\r
-  const std::type_info &ti1 = typeid([](auto &a) -> P& { static P p; return p; }(i));\r
-  const std::type_info &ti2 = typeid([](auto) -> int { return i; }(i));  // expected-error{{lambda expression in an unevaluated operand}}\\r
-                                                                         // expected-error{{cannot be implicitly captured}}\\r
-                                                                         // expected-note{{begins here}}\r
-}\r
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
+
+// prvalue
+void prvalue() {
+  auto&& x = [](auto a)->void { };
+  auto& y = [](auto *a)->void { }; // expected-error{{cannot bind to a temporary of type}}
+}
+
+namespace std {
+  class type_info;
+}
+
+struct P {
+  virtual ~P();
+};
+
+void unevaluated_operand(P &p, int i) { //expected-note{{declared here}}
+  // FIXME: this should only emit one error.
+  int i2 = sizeof([](auto a, auto b)->void{}(3, '4')); // expected-error{{lambda expression in an unevaluated operand}} \
+                                                       // expected-error{{invalid application of 'sizeof'}}
+  const std::type_info &ti1 = typeid([](auto &a) -> P& { static P p; return p; }(i));
+  const std::type_info &ti2 = typeid([](auto) -> int { return i; }(i));  // expected-error{{lambda expression in an unevaluated operand}}\
+                                                                         // expected-error{{cannot be implicitly captured}}\
+                                                                         // expected-note{{begins here}}
+}
index c5d3bf6d1bcf9263fd2b09e9c97b28020a2a6431..415c3d84560ef10efe8ffa7fa60164f227c8371b 100644 (file)
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y \r
-\r
-namespace test_factorial {\r
-\r
-auto Fact = [](auto Self, unsigned n) -> unsigned {\r
-    return !n ? 1 : Self(Self, n - 1) * n;\r
-};\r
-\r
-auto six = Fact(Fact, 3);\r
-\r
-}\r
-\r
-namespace overload_generic_lambda {\r
-  template <class F1, class F2> struct overload : F1, F2 {\r
-    using F1::operator();\r
-    using F2::operator();\r
-    overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }\r
-  };\r
-\r
-  auto NumParams = [](auto Self, auto h, auto ... rest) -> unsigned {\r
-    return 1 + Self(Self, rest...);\r
-  };\r
-  auto Base = [](auto Self, auto h) -> unsigned {\r
-      return 1;\r
-  };\r
-  overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);\r
-  int num_params =  O(O, 5, 3, "abc", 3.14, 'a');\r
-}\r
-\r
-\r
-namespace overload_generic_lambda_return_type_deduction {\r
-  template <class F1, class F2> struct overload : F1, F2 {\r
-    using F1::operator();\r
-    using F2::operator();\r
-    overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }\r
-  };\r
-\r
-  auto NumParams = [](auto Self, auto h, auto ... rest) {\r
-    return 1 + Self(Self, rest...);\r
-  };\r
-  auto Base = [](auto Self, auto h) {\r
-      return 1;\r
-  };\r
-  overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);\r
-  int num_params =  O(O, 5, 3, "abc", 3.14, 'a');\r
-}\r
-\r
-namespace test_standard_p5 {\r
-// FIXME: This test should eventually compile without an explicit trailing return type\r
-auto glambda = [](auto a, auto&& b) ->bool { return a < b; };\r
-bool b = glambda(3, 3.14); // OK\r
-\r
-}\r
-namespace test_deduction_failure {\r
- int test() {\r
-   auto g = [](auto *a) { //expected-note{{candidate template ignored}}\r
-    return a;\r
-   };\r
-   struct X { };\r
-   X *x;\r
-   g(x);\r
-   g(3); //expected-error{{no matching function}}\r
-   return 0;\r
- }\r
-\r
-}\r
-  \r
-namespace test_instantiation_or_sfinae_failure {\r
-int test2() {\r
-  {\r
-    auto L = [](auto *a) { \r
-                return (*a)(a); }; //expected-error{{called object type 'double' is not a function}}\r
-    double d;\r
-    L(&d); //expected-note{{in instantiation of}}\r
-    auto M = [](auto b) { return b; };\r
-    L(&M); // ok\r
-  }\r
-  {\r
-    auto L = [](auto *a) ->decltype (a->foo()) { //expected-note2{{candidate template ignored:}}\r
-                return (*a)(a); }; \r
-    double d;\r
-    L(&d); //expected-error{{no matching function for call}} \r
-    auto M = [](auto b) { return b; };\r
-    L(&M); //expected-error{{no matching function for call}} \r
\r
-  }\r
-  return 0;\r
-}\r
-\r
-\r
-}\r
-  \r
-namespace test_misc {\r
-auto GL = [](auto a, decltype(a) b) //expected-note{{candidate function}} \r
-                -> int { return a + b; };\r
-\r
-void test() {\r
-   struct X { };\r
-   GL(3, X{}); //expected-error{{no matching function}}\r
-}\r
-\r
-void test2() {\r
-  auto l = [](auto *a) -> int { \r
-              (*a)(a); return 0; }; //expected-error{{called object type 'double' is not a function}}\r
-  l(&l);\r
-  double d;\r
-  l(&d); //expected-note{{in instantiation of}}\r
-}\r
-\r
-}\r
-\r
-namespace nested_lambdas {\r
-  int test() {\r
-    auto L = [](auto a) {\r
-                 return [=](auto b) {  \r
-                           return a + b;\r
-                        };\r
-              };\r
-  }\r
-  auto get_lambda() {\r
-    return [](auto a) {\r
-      return a; \r
-    };\r
-  };\r
-  \r
-  int test2() {\r
-    auto L = get_lambda();\r
-    L(3);\r
-  }\r
-}\r
-\r
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y 
+
+namespace test_factorial {
+
+auto Fact = [](auto Self, unsigned n) -> unsigned {
+    return !n ? 1 : Self(Self, n - 1) * n;
+};
+
+auto six = Fact(Fact, 3);
+
+}
+
+namespace overload_generic_lambda {
+  template <class F1, class F2> struct overload : F1, F2 {
+    using F1::operator();
+    using F2::operator();
+    overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
+  };
+
+  auto NumParams = [](auto Self, auto h, auto ... rest) -> unsigned {
+    return 1 + Self(Self, rest...);
+  };
+  auto Base = [](auto Self, auto h) -> unsigned {
+      return 1;
+  };
+  overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
+  int num_params =  O(O, 5, 3, "abc", 3.14, 'a');
+}
+
+
+namespace overload_generic_lambda_return_type_deduction {
+  template <class F1, class F2> struct overload : F1, F2 {
+    using F1::operator();
+    using F2::operator();
+    overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
+  };
+
+  auto NumParams = [](auto Self, auto h, auto ... rest) {
+    return 1 + Self(Self, rest...);
+  };
+  auto Base = [](auto Self, auto h) {
+      return 1;
+  };
+  overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
+  int num_params =  O(O, 5, 3, "abc", 3.14, 'a');
+}
+
+namespace test_standard_p5 {
+// FIXME: This test should eventually compile without an explicit trailing return type
+auto glambda = [](auto a, auto&& b) ->bool { return a < b; };
+bool b = glambda(3, 3.14); // OK
+
+}
+namespace test_deduction_failure {
+ int test() {
+   auto g = [](auto *a) { //expected-note{{candidate template ignored}}
+    return a;
+   };
+   struct X { };
+   X *x;
+   g(x);
+   g(3); //expected-error{{no matching function}}
+   return 0;
+ }
+
+}
+  
+namespace test_instantiation_or_sfinae_failure {
+int test2() {
+  {
+    auto L = [](auto *a) { 
+                return (*a)(a); }; //expected-error{{called object type 'double' is not a function}}
+    double d;
+    L(&d); //expected-note{{in instantiation of}}
+    auto M = [](auto b) { return b; };
+    L(&M); // ok
+  }
+  {
+    auto L = [](auto *a) ->decltype (a->foo()) { //expected-note2{{candidate template ignored:}}
+                return (*a)(a); }; 
+    double d;
+    L(&d); //expected-error{{no matching function for call}} 
+    auto M = [](auto b) { return b; };
+    L(&M); //expected-error{{no matching function for call}} 
+  }
+  return 0;
+}
+
+
+}
+  
+namespace test_misc {
+auto GL = [](auto a, decltype(a) b) //expected-note{{candidate function}} 
+                -> int { return a + b; };
+
+void test() {
+   struct X { };
+   GL(3, X{}); //expected-error{{no matching function}}
+}
+
+void test2() {
+  auto l = [](auto *a) -> int { 
+              (*a)(a); return 0; }; //expected-error{{called object type 'double' is not a function}}
+  l(&l);
+  double d;
+  l(&d); //expected-note{{in instantiation of}}
+}
+
+}
+
+namespace nested_lambdas {
+  int test() {
+    auto L = [](auto a) {
+                 return [=](auto b) {  
+                           return a + b;
+                        };
+              };
+  }
+  auto get_lambda() {
+    return [](auto a) {
+      return a; 
+    };
+  };
+  
+  int test2() {
+    auto L = get_lambda();
+    L(3);
+  }
+}
+
index 92bc0fcac2eceafbfd310c30c9edc27fbe7294a0..c8477f4cbdd32850fe869e22eec0e61eff0580cd 100644 (file)
@@ -6,5 +6,5 @@ struct A : virtual B {} a;
 
 // The <> indicate that the pointer is packed, which is required to support
 // microsoft layout in 32 bit mode, but not 64 bit mode.
-// CHECK: %struct.A = type <{ i32*, %struct.B }>\r
-// CHECK-X64: %struct.A = type { i32*, %struct.B }\r
+// CHECK: %struct.A = type <{ i32*, %struct.B }>
+// CHECK-X64: %struct.A = type { i32*, %struct.B }
index 4c3d72e9f4c7a84441012505baaa95e355ea0c29..7857e478ef82b8e5f29ac5f8a90593cdef0288d9 100644 (file)
@@ -1,39 +1,39 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s\r
-\r
-#include <stddef.h>\r
-\r
-struct arbitrary_t {} arbitrary;\r
-void *operator new(size_t size, arbitrary_t);\r
-\r
-struct arbitrary2_t {} arbitrary2;\r
-void *operator new[](size_t size, arbitrary2_t);\r
-\r
-namespace PR13164 {\r
-  void f() {\r
-       // MSVC will fall back on the non-array operator new.\r
-    void *a;\r
-    int *p = new(arbitrary) int[4];\r
-    // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 16, %struct.arbitrary_t*\r
-  }\r
-\r
-  struct S {\r
-    void *operator new[](size_t size, arbitrary_t);\r
-  };\r
-\r
-  void g() {\r
-    S *s = new(arbitrary) S[2];\r
-    // CHECK: call i8* @"\01??_US@PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 2, %struct.arbitrary_t*\r
-    S *s1 = new(arbitrary) S;\r
-    // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 1, %struct.arbitrary_t*\r
-  }\r
-\r
-  struct T {\r
-    void *operator new(size_t size, arbitrary2_t);\r
-  };\r
-\r
-  void h() {\r
-    // This should still call the global operator new[].\r
-    T *t = new(arbitrary2) T[2];\r
-    // CHECK: call i8* @"\01??_U@YAPAXIUarbitrary2_t@@@Z"(i32 2, %struct.arbitrary2_t*\r
-  }\r
-}\r
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
+
+#include <stddef.h>
+
+struct arbitrary_t {} arbitrary;
+void *operator new(size_t size, arbitrary_t);
+
+struct arbitrary2_t {} arbitrary2;
+void *operator new[](size_t size, arbitrary2_t);
+
+namespace PR13164 {
+  void f() {
+       // MSVC will fall back on the non-array operator new.
+    void *a;
+    int *p = new(arbitrary) int[4];
+    // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 16, %struct.arbitrary_t*
+  }
+
+  struct S {
+    void *operator new[](size_t size, arbitrary_t);
+  };
+
+  void g() {
+    S *s = new(arbitrary) S[2];
+    // CHECK: call i8* @"\01??_US@PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 2, %struct.arbitrary_t*
+    S *s1 = new(arbitrary) S;
+    // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 1, %struct.arbitrary_t*
+  }
+
+  struct T {
+    void *operator new(size_t size, arbitrary2_t);
+  };
+
+  void h() {
+    // This should still call the global operator new[].
+    T *t = new(arbitrary2) T[2];
+    // CHECK: call i8* @"\01??_U@YAPAXIUarbitrary2_t@@@Z"(i32 2, %struct.arbitrary2_t*
+  }
+}
index 6a22d2e88eb3f55a9bd50a2711a7200b275ceb03..358609b4066da3f967c85e3b561204bd38ecc519 100644 (file)
@@ -1 +1 @@
-// This file is purposefully left empty\r
+// This file is purposefully left empty
index d7e2d0a3dcf9a19c06c7be3241bdca89aafad5d7..b521196c23b652368b6073403a115823767f87d5 100644 (file)
@@ -268,16 +268,16 @@ namespace pr9247 {
 }
 
 namespace pr12658 {
-  class C {\r
-    public:\r
-      C(int v){}\r
-      virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}\r
-  };\r
-\r
-  void foo( C& c ) {}\r
-\r
-  void bar( void ) {\r
-    foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}\r
+  class C {
+    public:
+      C(int v){}
+      virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
+  };
+
+  void foo( C& c ) {}
+
+  void bar( void ) {
+    foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}
   }
 }
 
index 15b5d0d315e8d91d2c68366c23b5236ad2889734..baacbac7d0363931e7c65f23649928850fcafb1f 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s\r
-\r
-struct Vector {\r
-       __vector float xyzw;\r
-} __attribute__((vecreturn)) __attribute__((vecreturn));  // expected-error {{'vecreturn' attribute cannot be repeated}}\r
+// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s
+
+struct Vector {
+       __vector float xyzw;
+} __attribute__((vecreturn)) __attribute__((vecreturn));  // expected-error {{'vecreturn' attribute cannot be repeated}}
index 04f4a63623619fbd6b9495cc7a1211c1a7d228d6..9b95bba5068af914156cd601c72573a8566dd550 100644 (file)
@@ -48,11 +48,11 @@ void f(T t) {
     { }
   }
 
-  int array2[] = {\r
-    0, \r
-    __if_exists(T::bar) {2, }// expected-warning{{dependent __if_exists declarations are ignored}}\r
-    3\r
-  };\r
+  int array2[] = {
+    0, 
+    __if_exists(T::bar) {2, }// expected-warning{{dependent __if_exists declarations are ignored}}
+    3
+  };
 }
 
 template void f(HasFoo); // expected-note{{in instantiation of function template specialization 'f<HasFoo>' requested here}}