diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-05-08 22:52:41 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-05-08 22:52:41 +0000 |
commit | a8ef3ac9fa7637fad33d52614794b92e2261d65b (patch) | |
tree | dbfe429bafd43c2ba7f3d95a0ef1eefec8f98063 /test/SemaCXX/MicrosoftExtensions.cpp | |
parent | a2447e0d1e28669cd637204a871f15b1215277fd (diff) |
Allow implicit conversion from function pointer to void* in Microsoft mode.
Necessary to parse MFC code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/MicrosoftExtensions.cpp')
-rw-r--r-- | test/SemaCXX/MicrosoftExtensions.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/SemaCXX/MicrosoftExtensions.cpp b/test/SemaCXX/MicrosoftExtensions.cpp index 2d620b6da6..40492608c0 100644 --- a/test/SemaCXX/MicrosoftExtensions.cpp +++ b/test/SemaCXX/MicrosoftExtensions.cpp @@ -179,4 +179,14 @@ void static_func(); // expected-note {{previous declaration is here}} static void static_func() // expected-warning {{static declaration of 'static_func' follows non-static declaration}} { -}
\ No newline at end of file +} + +long function_prototype(int a); +long (*function_ptr)(int a); + +void function_to_voidptr_conv() { + void *a1 = function_prototype; + void *a2 = &function_prototype; + void *a1 = function_ptr; + void *a2 = &function_ptr; +} |