[cfe-dev] clang-tidy google-build-using-namespace check and std::.*literals

Martin via cfe-dev cfe-dev at lists.llvm.org
Mon Feb 15 10:17:42 PST 2016


Hello Nikola,

On Sun, Feb 14, 2016 at 11:48 PM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> Could it be the leading :: in your regex?

I do not think so. The SizeofContainerCheck, for instance, does
something similar:

https://github.com/llvm-mirror/clang-tools-extra/blob/61bf08cac6860dfd33287ee756dcb7453f14a4e4/clang-tidy/misc/SizeofContainerCheck.cpp#L25

> On Sat, Feb 13, 2016 at 4:10 AM, Martin via cfe-dev <cfe-dev at lists.llvm.org>
> wrote:
>>
>> Hello,
>>
>> (I am not subscribed to cfe-dev so please keep me in CC.)
>>
>> I would like to get some feedback on
>> https://llvm.org/bugs/show_bug.cgi?id=25594 . Patch here:
>> https://llvm.org/bugs/attachment.cgi?id=15324 .
>>
>> More specifically, why does my matcher modification not make it so
>> that the check skips std::.*literals namespaces? Have I misunderstood
>> what regular expression dialect is used in LLVM? Am I not using the
>> matcher correctly?
>>
>> When writing the patch I tried to see how matchers are used in other
>> places and also tried to verify the regexp dialect. If I remember
>> correctly, I could not find any documentation for this though. Or, at
>> least any documentation or uses of matchers in other places of the
>> code that indicated to me that this should not work.
>>
>> Also, is this patch something that is wanted? As far as I know there
>> is no way to use the standard defined literals without "using".
>>
>> Thanks!

--
Martin



More information about the cfe-dev mailing list