Last active
October 16, 2022 20:58
-
-
Save Trass3r/a96d51cf1b3bfa44d66a90d0b0c3c7b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="/c/Program Files/LLVM/bin":$PATH | |
find include/llvm/IR -name '*.h' | xargs clang-query -p objdir | |
clang-query -p objdir include\llvm\IR\Value.h include\llvm\IR\Use.h include\llvm\Analysis\CallGraph.h | |
clang-query -p objdir include\llvm\ADT\SmallVector.h | |
vs | |
clang-query -p objdir include\llvm\Support\Allocator.h | |
m cxxRecordDecl(hasDefinition().bind("d"), hasExternalFormalLinkage(), unless(anyOf(isExpansionInSystemHeader(), isExplicitTemplateSpecialization(), hasParent(classTemplateDecl()), hasParent(classTemplateSpecializationDecl())))) | |
m cxxRecordDecl(hasExternalFormalLinkage(), isClass(), unless(isExpansionInSystemHeader()), hasAncestor(namespaceDecl(isAnonymous()).bind("ns"))) | |
l getClass hasParent(cxxRecordDecl().bind("class")) | |
m cxxMethodDecl(nosys, unless(isDefinition()), getClass) | |
l isnllvm unless(isllvm) | |
l extsym hasExternalFormalLinkage() | |
l isllvm hasAncestor(namespaceDecl(hasName("llvm"))) | |
l nosys unless(isExpansionInSystemHeader()) | |
l hasM hasDescendant(cxxMethodDecl(unless(isEffectivelyInline())).bind("method")) | |
l hasD has(varDecl(isDefinition()).bind("var")) | |
m cxxRecordDecl(nosys, hasD, isllvm) | |
m cxxRecordDecl(nosys, anyOf(hasM, hasD), isllvm) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N=4 | |
( | |
for D in include/llvm/S*/ | |
do | |
((i=i%N)); ((i++==0)) && wait | |
FOLDER=`basename $D` | |
find $D -name '*.h' | xargs -t objdir/bin/clang-tidy.exe -fix-errors -p objdir -checks=-*,performance-symbol-export -config="{CheckOptions: [{key: performance-symbol-export.exportMacro, value: LLVM${FOLDER^^}_EXPORT}, {key: performance-symbol-export.exportHdr, value: llvm${FOLDER,,}_export.h}]}" -export-fixes="test$FOLDER.yaml" & | |
# -header-filter=.* | |
done | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Class | |
{ | |
void inlineMethod() {} | |
void outoflineMethod(); | |
template <typename T> | |
void inlineTemplateMethod() {}; | |
template <typename T> | |
void outoflineTemplateMethod(); | |
static const char staticConstDataDecl; | |
static const char staticConstDataDef = 0; | |
static void outoflineStaticMethodDecl(); | |
static void inlineStaticMethodDef() {} | |
private: | |
static char staticData; | |
}; | |
template <typename T> | |
void Class::outoflineTemplateMethod() | |
{ | |
} | |
struct Base | |
{ | |
virtual ~Base() = default; | |
virtual void virtualMethod() = 0; | |
virtual void virtualMethod2() = 0; | |
}; | |
class Derived final : public Base | |
{ | |
void virtualMethod() override {} | |
void virtualMethod2() override; | |
}; | |
class DerivedInline final : public Base | |
{ | |
void virtualMethod() override {} | |
void virtualMethod2() override {} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment