aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorYitzhak Mandelbaum <yitzhakm@google.com>2020-11-16 14:30:21 +0000
committerYitzhak Mandelbaum <yitzhakm@google.com>2020-11-18 18:25:21 +0000
commit068da2c749a58b46bd59381890a6a137d6e3128e (patch)
tree056e0c8380549294d61bb937e4e192fa98c269d2 /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent733f7b50840a202a7ca950db03a2e7d09a147453 (diff)
downloadllvm-068da2c749a58b46bd59381890a6a137d6e3128e.zip
llvm-068da2c749a58b46bd59381890a6a137d6e3128e.tar.gz
llvm-068da2c749a58b46bd59381890a6a137d6e3128e.tar.bz2
[clang-tidy] Allow `TransformerClangTidyCheck` clients to set the rule directly.
Adds support for setting the `Rule` field. In the process, refactors the code that accesses that field and adds a constructor that doesn't require a rule argument. This feature is needed by checks that must set the rule *after* the check class is constructed. For example, any check that maintains state to be accessed from the rule needs this support. Since the object's fields are not initialized when the superclass constructor is called, they can't be (safely) captured by a rule passed to the existing constructor. This patch allows constructing the check superclass fully before setting the rule. As a driveby fix, removed the "optional" from the rule, since rules are just a set of cases, so empty rules are evident. Differential Revision: https://reviews.llvm.org/D91544
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions