Alex Lorenz | 24a1bed | 2017-02-24 17:45:16 +0000 | [diff] [blame] | 1 | |
| 2 | #define Outer(action) action |
| 3 | |
| 4 | void completeParam(int param) { |
| 5 | ; |
| 6 | Outer(__extension__({ _Pragma("clang diagnostic push") })); |
| 7 | param; |
| 8 | } |
| 9 | |
| 10 | // RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:7:1 %s | FileCheck %s |
| 11 | // CHECK: param : [#int#]param |
| 12 | |
| 13 | void completeParamPragmaError(int param) { |
| 14 | Outer(__extension__({ _Pragma(2) })); // expected-error {{_Pragma takes a parenthesized string literal}} |
| 15 | param; |
| 16 | } |
| 17 | |
| 18 | // RUN: %clang_cc1 -fsyntax-only -verify -code-completion-at=%s:16:1 %s | FileCheck %s |