Details
- Reviewers
klimek aaron.ballman
Diff Detail
- Build Status
Buildable 464 Build 464: arc lint + arc unit
Event Timeline
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
3005 | How does this differ from the existing matcher hasStaticStorageDuration() over a fieldDecl()? |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
3005 | fieldDecl document says that fieldDecl is "an instance of this class is created by Sema::ActOnField to Technically, we can't apply hasStaticStorageDuration() and isStaticStorageClass over a fieldDecl. |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
3005 | That's a really good point, but the question still remains: since we have hasStaticStorageDuration() already, can we find a way to use that same matcher rather than introduce a new matcher under a new name that does the same thing? This time I tested a matcher, and found that you get the correct behavior from varDecl(hasStaticStorageDuration(), hasParent(recordDecl())). I think this is especially important to try to do because we have hasStaticStorageDuration() and isStaticStorageClass(), so adding isStaticDataMember() adds a third option to possibly confuse users. |
include/clang/ASTMatchers/ASTMatchers.h | ||
---|---|---|
3005 | Thanks for the explanations, I think it makes sense. Previously I thought isStaticDataMember is an more obvious ast matcher. |
How does this differ from the existing matcher hasStaticStorageDuration() over a fieldDecl()?