On Tue, Sep 15, 2015 at 11:31 AM, Alexander Kornienko <ale...@google.com> wrote: > On Fri, Sep 11, 2015 at 3:30 PM, Aaron Ballman <aa...@aaronballman.com> > wrote: >> >> On Fri, Sep 11, 2015 at 9:27 AM, Alexander Kornienko via cfe-commits >> <cfe-commits@lists.llvm.org> wrote: >> > Thank you for the fix and sorry for breaking this again. I wonder what's >> > the >> > reason windows-targeting enables -fdelayed-template-parsing? >> >> Because that's required for MSVC compatibility. > > > That's what I understood from reading the flag description, however it > doesn't help me understand why. But reading this and this made things clear. > So it looks like we can't safely turn this off, because some code may rely > on this, but with this option the AST doesn't contain bodies of > FunctionTemplateDecls, which affects some checks.
Yeah, I have been surprised by this as well. Those checks behave as expected when the template is actually instantiated, but not otherwise, though. > And this seems to be the issue for other Clang Tools as well. There was a > discussion about that last year, which has lead nowhere, I guess. Reopening the discussion might not be a bad thing, but I'm not certain what could be done realistically since we need this in order to properly handle some headers shipped by Microsoft. ~Aaron > >> >> >> > Would it be the right thing to always turn this off in clang-tidy? >> >> I don't think it would be a good thing to turn off in clang-tidy as >> the behavior would diverge from the default in clang on Windows (with >> MSVC mode). >> >> ~Aaron >> >> > >> > >> > On Fri, Sep 11, 2015 at 10:16 AM, NAKAMURA Takumi via cfe-commits >> > <cfe-commits@lists.llvm.org> wrote: >> >> >> >> Author: chapuni >> >> Date: Fri Sep 11 03:16:22 2015 >> >> New Revision: 247393 >> >> >> >> URL: http://llvm.org/viewvc/llvm-project?rev=247393&view=rev >> >> Log: >> >> clang-tidy/readability-inconsistent-declaration-parameter-name.cpp: >> >> Appease MS-incompatibility [-fno-delayed-template-parsing] >> >> >> >> Modified: >> >> >> >> >> >> clang-tools-extra/trunk/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp >> >> >> >> Modified: >> >> >> >> clang-tools-extra/trunk/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp >> >> URL: >> >> >> >> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp?rev=247393&r1=247392&r2=247393&view=diff >> >> >> >> >> >> ============================================================================== >> >> --- >> >> >> >> clang-tools-extra/trunk/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp >> >> (original) >> >> +++ >> >> >> >> clang-tools-extra/trunk/test/clang-tidy/readability-inconsistent-declaration-parameter-name.cpp >> >> Fri Sep 11 03:16:22 2015 >> >> @@ -1,4 +1,4 @@ >> >> -// RUN: %python %S/check_clang_tidy.py %s >> >> readability-inconsistent-declaration-parameter-name %t >> >> +// RUN: %python %S/check_clang_tidy.py %s >> >> readability-inconsistent-declaration-parameter-name %t -- -std=c++11 >> >> -fno-delayed-template-parsing >> >> >> >> void consistentFunction(int a, int b, int c); >> >> void consistentFunction(int a, int b, int c); >> >> >> >> >> >> _______________________________________________ >> >> cfe-commits mailing list >> >> cfe-commits@lists.llvm.org >> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > >> > >> > >> > _______________________________________________ >> > cfe-commits mailing list >> > cfe-commits@lists.llvm.org >> > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits