brintos

brintos / llvm-project-archived public Read only

0
0
Text · 715 B · 7b1c7b6 Raw
28 lines · cpp
1// RUN: %clang_cc1 -fmodules -x c++-module-map %s -fmodule-name=__usr_include -verify2// RUN: %clang_cc1 -fmodules -x c++-module-map %s -fmodule-name=__usr_include -verify -DIMPORT3 4module __usr_include {5  module stddef {}6  module stdlib {}7}8 9#pragma clang module contents10 11// expected-no-diagnostics12 13#pragma clang module begin __usr_include.stddef14  #define NULL 015#pragma clang module end16 17#pragma clang module begin __usr_include.stdlib18  #ifdef IMPORT19    #pragma clang module import __usr_include.stddef20  #else21    #pragma clang module begin __usr_include.stddef22      #define NULL 023    #pragma clang module end24  #endif25 26  void *f() { return NULL; } // ok, NULL is visible here27#pragma clang module end28