[cfe-commits] r131113 - /cfe/trunk/test/Parser/MicrosoftExtensions.cpp

Douglas Gregor dgregor at apple.com
Mon May 9 17:15:00 PDT 2011


Thanks!


On May 9, 2011, at 5:08 PM, Francois Pichet wrote:

> Author: fpichet
> Date: Mon May  9 19:08:32 2011
> New Revision: 131113
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=131113&view=rev
> Log:
> Add a __uuidof test where the uuid attribute is on the second declaration. 
> Also some -fdelayed-template-parsing test refactoring.
> 
> Modified:
>    cfe/trunk/test/Parser/MicrosoftExtensions.cpp
> 
> Modified: cfe/trunk/test/Parser/MicrosoftExtensions.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.cpp?rev=131113&r1=131112&r2=131113&view=diff
> ==============================================================================
> --- cfe/trunk/test/Parser/MicrosoftExtensions.cpp (original)
> +++ cfe/trunk/test/Parser/MicrosoftExtensions.cpp Mon May  9 19:08:32 2011
> @@ -1,4 +1,4 @@
> -// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions
> +// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions -fdelayed-template-parsing
> 
> /* Microsoft attribute tests */
> [repeatable][source_annotation_attribute( Parameter|ReturnValue )]
> @@ -105,6 +105,13 @@
> class COM_CLASS_TEMPLATE_REF  { };
> typedef COM_CLASS_TEMPLATE<struct_with_uuid, __uuidof(struct_with_uuid)> COM_TYPE_REF;
> 
> +  struct late_defined_uuid;
> +  template<typename T>
> +  void test_late_defined_uuid() {
> +    __uuidof(late_defined_uuid);
> +  }
> +  struct __declspec(uuid("000000A0-0000-0000-C000-000000000049")) late_defined_uuid;
> +
> 
> class CtorCall { 
> public:
> @@ -136,7 +143,7 @@
> };
> 
> template <class T>
> -void f(){
> +void missing_template_keyword(){
>   typename C1<T>:: /*template*/ Iterator<0> Mypos; // expected-warning {{use 'template' keyword to treat 'Iterator' as a dependent template name}}
> }
> 
> @@ -151,11 +158,6 @@
>    t = 3;
> }
> 
> -int main() {
> -  redundant_typename<int>();
> -  f<int>();
> -}
> -
> 
> __interface MicrosoftInterface;
> __interface MicrosoftInterface {
> @@ -210,3 +212,11 @@
> 
> int __identifier(generic) = 3;
> 
> +
> +int main () {
> +  // Necessary to force instantiation in -fdelayed-template-parsing mode.
> +  test_late_defined_uuid<int>(); 
> +  redundant_typename<int>();
> +  missing_template_keyword<int>();
> +}
> +
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits




More information about the cfe-commits mailing list