~shimon/dismaltc

ref: 461e0617cb03f1d5027af4fbb3da0722791022e9 dismaltc/clang/disable-test/CodeCompletion/pragma-macro-token-caching.c -rw-r--r-- 510 bytes
461e0617Itoh Shimon re-enable tests. 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define Outer(action) action

void completeParam(int param) {
    ;
    Outer(__extension__({ _Pragma("clang diagnostic push") }));
    param;
}

// RUN: %clang_cc1 -fsyntax-only -code-completion-at=%s:7:1 %s | FileCheck %s
// CHECK: param : [#int#]param

void completeParamPragmaError(int param) {
    Outer(__extension__({ _Pragma(2) })); // expected-error {{_Pragma takes a parenthesized string literal}}
    param;
}

// RUN: %clang_cc1 -fsyntax-only -verify -code-completion-at=%s:16:1 %s | FileCheck %s