Home | History | Annotate | Download | only in PCH
      1 // Test this without pch.
      2 // RUN: %clang_cc1 -include %S/cxx-friends.h -fsyntax-only -verify %s
      3 
      4 // Test with pch.
      5 // RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-friends.h
      6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize
      7 
      8 // Test with modules.
      9 // RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-friends.h -fmodules
     10 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s -error-on-deserialized-decl doNotDeserialize -fmodules
     11 
     12 // expected-no-diagnostics
     13 
     14 class F {
     15   void m() {
     16     A* a;
     17     a->x = 0;
     18   }
     19 };
     20 
     21 template<typename T> class PR12585::future_base::setter {
     22 public:
     23   int f() {
     24     return promise<T*>().k;
     25   }
     26 };
     27 int k = PR12585::future_base::setter<int>().f();
     28 
     29 Lazy::S *p;
     30