Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessor macros inside blocks are not annotated by clang_annotateTokens as expected #13342

Closed
llvmbot opened this issue May 28, 2012 · 2 comments
Labels
bugzilla Issues migrated from bugzilla clang:as-a-library libclang and C++ API

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented May 28, 2012

Bugzilla Link 12970
Resolution FIXED
Resolved on Dec 11, 2012 19:36
Version trunk
OS Linux
Reporter LLVM Bugzilla Contributor
CC @akyrtzi

Extended Description

In the following C++ code:
===== t.cpp ===
class A
{
#ifdef SOME_MACRO
// whatever
#endif
};

tokens from preprocessor directives are annotated as 'ClassDecl=A' by clang_annotateTokens. Similarly, clang_getCursor returns cursor of kind ClassDecl.

The same with other blocks like structures, namespaces, enums, functions, etc.

@akyrtzi
Copy link
Contributor

akyrtzi commented May 29, 2012

cloned to rdar://problem/11548788

@akyrtzi
Copy link
Contributor

akyrtzi commented Dec 12, 2012

FIxed in r169949

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla clang:as-a-library libclang and C++ API
Projects
None yet
Development

No branches or pull requests

2 participants