[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-04-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D41648#1047799, @JonasToth wrote: > I checked several codebases and implemented a little helper script to see > which kind of macros exist. Then I added some filter regex as configuration > and tried again, here are the results: > > For htt

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 142544. JonasToth added a comment. - [Misc] unify handle and value modification detection - [Misc] found new caveats, maybe take a look at refactoring first an require this check to produce clean compiles on llvm Repository: rCTE Clang Tools Extra http

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-15 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @aaron.ballman @lebedev.ri The check is getting really complex. I run it over LLVM and detected some warnings, where iam not sure if they are valid or not. Its already a somewhat usable state, but its hard to determine false positives and false negatives. For me, tha

[PATCH] D45665: [builtin-dump-struct] printf format checking

2018-04-15 Thread Paul Semel via Phabricator via cfe-commits
paulsemel created this revision. paulsemel added a reviewer: aaron.ballman. Added check for correct formats in CodeGen tests, to ensure we are printing the fields correctly. Added a fix that outcomed from this previous add Repository: rC Clang https://reviews.llvm.org/D45665 Files: lib/Co

[PATCH] D45665: [builtin-dump-struct] printf format checking

2018-04-15 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 142548. paulsemel added a comment. Fixed typo.. Repository: rC Clang https://reviews.llvm.org/D45665 Files: lib/CodeGen/CGBuiltin.cpp test/CodeGen/dump-struct-builtin.c Index: test/CodeGen/dump-struct-builtin.c

r330095 - [analyzer] Do not invalidate the `this` pointer.

2018-04-15 Thread Henry Wong via cfe-commits
Author: henrywong Date: Sun Apr 15 03:34:06 2018 New Revision: 330095 URL: http://llvm.org/viewvc/llvm-project?rev=330095&view=rev Log: [analyzer] Do not invalidate the `this` pointer. Summary: `this` pointer is not an l-value, although we have modeled `CXXThisRegion` for `this` pointer, we can

[PATCH] D45491: [analyzer] Do not invalidate the `this` pointer.

2018-04-15 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330095: [analyzer] Do not invalidate the `this` pointer. (authored by henrywong, committed by ). Repository: rC Clang https://reviews.llvm.org/D45491 Files: lib/StaticAnalyzer/Core/LoopWidening.cpp

[PATCH] D45668: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-15 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: t.p.northover, rengolin, SjoerdMeijer. kosarev added a project: clang. Herald added subscribers: kristof.beyls, javed.absar. These are AArch64-specific intrinsics. The patch removes AArch32-mode test cases and maintains AArch64 ones in tool

[PATCH] D45669: [NEON] Fix the architecture condition for the crypto intrinsics

2018-04-15 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: t.p.northover, rengolin, SjoerdMeijer. kosarev added a project: clang. Herald added subscribers: kristof.beyls, javed.absar. This is rather a cosmetic change as on ARMv7 targets we do not define __ARM_FEATURE_CRYPTO, even if it was explicitl

[PATCH] D45670: [NEON} Define vfma_n_f32() and vfmaq_n_f32() intrinsics in AArch32 mode

2018-04-15 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev created this revision. kosarev added reviewers: t.p.northover, rengolin, SjoerdMeijer. kosarev added a project: clang. Herald added subscribers: kristof.beyls, javed.absar. Currently we only support them in AArch64 mode. The AArch64 test cases are in tools/clang/test/CodeGen/aarch64-neon-

[PATCH] D45671: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug 36677

2018-04-15 Thread Kyle Teske via Phabricator via cfe-commits
kjteske created this revision. Herald added a subscriber: cfe-commits. In cindex.py, Cursor.result_type called into the wrong libclang function, causing cursors for ObjC method declarations to return invalid result types. Fixes Bug 36677. Repository: rC Clang https://reviews.llvm.org/D45671

[PATCH] D43576: Solution to fix PR27066 - Redefinition with same mangled name as another definition (dllexport and uuid)

2018-04-15 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam marked 4 inline comments as done. zahiraam added inline comments. Comment at: lib/Parse/ParseDecl.cpp:572 +DeclSpecUuidDecl *ArgDecl = + DeclSpecUuidDecl::Create(Actions.getASTContext(), + Actions.getFunctionLevelDeclContext(),

[PATCH] D36610: [Tooling] Add option to getFullyQualifiedName using a custom PritingPolicy

2018-04-15 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho updated this revision to Diff 142578. mikhail.ramalho added a comment. Rebased to current master. Removed the getFullyQualifiedName overloaded function. https://reviews.llvm.org/D36610 Files: include/clang/AST/QualTypeNames.h lib/AST/QualTypeNames.cpp unittests/Tooling/Qu

[PATCH] D35181: Defer addition of keywords to identifier table when loading AST

2018-04-15 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn updated this revision to Diff 142579. jklaehn added a comment. Thanks for the review! As I do not have commit access, it would be great if you could commit the updated patch. https://reviews.llvm.org/D35181 Files: include/clang/Basic/IdentifierTable.h lib/Basic/IdentifierTable.cpp

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 6 inline comments as done. Szelethus added a comment. I'm about to update the diff, I changed a quite a lot of stuff, so I'm not sure that I'd be able to respond to these inline comments. Comment at: lib/StaticAnalyzer/Checkers/CtorUninitializedMemberChecker.c

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 142581. Szelethus marked 2 inline comments as done. Szelethus edited the summary of this revision. Szelethus added a comment. Among many other things: - The checker class is now on top of the file. - Reviewed all comments, fixed typos, tried to make the gen

[PATCH] D45532: [StaticAnalyzer] Checker to find uninitialized fields after a constructor call

2018-04-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 24 inline comments as done. Szelethus added a comment. Note that there was a comment made about the test files being too long. I still haven't split them, as I didn't find a good "splitting point". Is this okay, or shall I try to split these into numerous smaller ones? https:/

[PATCH] D45407: [StaticAnalyzer] Added notes to the plist output

2018-04-15 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. > Btw, what sort of UI are you trying to make these extra note pieces of mine > work with? I'm also developing a checker: https://reviews.llvm.org/D45532. This checker emits very important information in notes. When I tried testing it with Ericsson's CodeChecker, I r

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-15 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. I have noticed two things when attempting to release LLVM with this revision internally at Google: 1. It's catching real bugs, all in constructors where someone wrote "member_ = member_" when they meant "member_ = member". 2. It's catching at least as many cases of

[PATCH] D45677: [libcxx] [test] Fix typo in filesystem test

2018-04-15 Thread Joe Loser via Phabricator via cfe-commits
jloser created this revision. jloser added a reviewer: EricWF. Herald added subscribers: cfe-commits, christof. There was a typo in "omitted" in `/test/std/experimental/filesystem/fs.op.funcs/fs.op.relative/relative.pass.cpp ` Repository: rCXX libc++ https://reviews.llvm.org/D45677 Files:

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-15 Thread Brooks Moses via Phabricator via cfe-commits
brooksmoses added a comment. Further note: I'm noticing that nearly all the signal is from -Wself-assign-field and all the noise is from -Wself-assign. So that would be one obvious way to make this higher-signal in what's enabled in -Wall, if that were a desire. Repository: rC Clang https

[PATCH] D43578: -ftime-report switch support in Clang

2018-04-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D43578#1068127, @mzolotukhin wrote: > > Who is the audience for this information? > > What information do they want from a time report? > > How do we present that information in a way that's not misleading (given > > Clang's architecture)? >

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-15 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:678-679 TC.AddCXXStdlibLibArgs(Args, CmdArgs); + if (TC.getTriple().getOS() == llvm::Triple::OpenBSD) +CmdArgs.push_back(Args.hasArg(options::OPT_pg) ? "-lc++_p" : "-lc++"); +}

[PATCH] D45679: Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-15 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang created this revision. Herald added subscribers: cfe-commits, mgorny, klimek. shuaiwang added a reviewer: hokein. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp cla

[PATCH] D45613: [X86] Introduce archs: goldmont-plus & tremont

2018-04-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D45613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D45679: [clang-tidy] Add a new check, readability-unmodified-non-const-variable, that finds declarations of non-const variables that never get modified.

2018-04-15 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. See also https://reviews.llvm.org/D45444. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D45444: [clang-tidy] WIP: implement new check for const-correctness

2018-04-15 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang added a comment. Coming from https://reviews.llvm.org/D45679, which I should have sent out much earlier to get in front of you :p Kidding aside this check is more mature than mine and I'm happy to help incorporate mine into this one. I do have a strong opinion that requires non-trivi

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-15 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:678-679 TC.AddCXXStdlibLibArgs(Args, CmdArgs); + if (TC.getTriple().getOS() == llvm::Triple::OpenBSD) +CmdArgs.push_back(Args.hasArg(options::OPT_pg) ? "-lc++_p" : "-lc++"); +

[PATCH] D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.

2018-04-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 142597. ahatanak marked 4 inline comments as done. ahatanak retitled this revision from "Add a command line option 'fregister_dtor_with_atexit' to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit."

[PATCH] D45578: Add a command line option `fregister_global_dtors_with_atexit` to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or atexit.

2018-04-15 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: include/clang/Driver/Options.td:1613 +def fregister_dtor_with_atexit : Flag<["-"], "fregister-dtor-with-atexit">, Group, Flags<[CC1Option]>, + HelpText<"Use atexit or __cxa_atexit to register destructors">; def fuse_init_array : Flag

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-15 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:678-679 TC.AddCXXStdlibLibArgs(Args, CmdArgs); + if (TC.getTriple().getOS() == llvm::Triple::OpenBSD) +CmdArgs.push_back(Args.hasArg(options::OPT_pg) ? "-lc++_p" : "-lc++"); +}

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-15 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:678-679 TC.AddCXXStdlibLibArgs(Args, CmdArgs); + if (TC.getTriple().getOS() == llvm::Triple::OpenBSD) +CmdArgs.push_back(Args.hasArg(options::OPT_pg) ? "-lc++_p" : "-lc++"); +