Logo
Explore Help
Sign In
mirrors/llvm-project
0
0
Fork 0
You've already forked llvm-project
mirror of https://github.com/llvm/llvm-project.git synced 2025-05-18 07:46:07 +00:00
Code Issues Projects Releases Wiki Activity
llvm-project/clang/test/Index/file-macro-refs.c

13 lines
361 B
C
Raw Normal View History

[libclang] Make clang_findReferencesInFile also work on macros (find all expansions/definition of a macro in a file). As a bonus, also make searching for declarations more efficient by ignoring preprocessing entities when we know that we are looking for a declaration. Fixes rdar://10427411. llvm-svn: 145369
2011-11-29 03:14:11 +00:00
#define FOO
FOO
FOO
// RUN: c-index-test -file-refs-at=%s:3:2 %s | FileCheck %s
[libclang] Make the test portable. llvm-svn: 145377
2011-11-29 05:48:01 +00:00
// RUN: env CINDEXTEST_EDITING=1 c-index-test -file-refs-at=%s:3:2 %s | FileCheck %s
[libclang] Make clang_findReferencesInFile also work on macros (find all expansions/definition of a macro in a file). As a bonus, also make searching for declarations more efficient by ignoring preprocessing entities when we know that we are looking for a declaration. Fixes rdar://10427411. llvm-svn: 145369
2011-11-29 03:14:11 +00:00
// CHECK: macro expansion=FOO:1:9
// CHECK-NEXT: macro definition=FOO =[1:9 - 1:12]
// CHECK-NEXT: macro expansion=FOO:1:9 =[3:1 - 3:4]
// CHECK-NEXT: macro expansion=FOO:1:9 =[4:1 - 4:4]
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.5 Page: 2240ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API