[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang marked an inline comment as done. shuaiwang added a comment. Hi @alexfh, @hokein, @JonasToth, I've updated this diff to be just adding the helper function `isModified()` with a set of dedicated unit tests. What do you think of the approach of getting this change committed and then

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D38615: [libclang] Only mark CXCursors for explicit attributes with a type

2018-04-17 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping https://reviews.llvm.org/D38615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44888: [RISCV] Default enable linker relaxation and add -mrelax, -mno-relax flags

2018-04-17 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 added a comment. In https://reviews.llvm.org/D44888#1068806, @asb wrote: > Thanks Kito. -mrelax and -mno-relax currently only affect the backend. For > completeness, I think this patch needs to pass the appropriate flag to the > linker depending on relax/no-relax. Hi Alex.

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Greg Parker via Phabricator via cfe-commits
gparker42 added a comment. Note that we recently relaxed a similar diagnostic for `NSNumber *` in the static analyzer. Such code is semantically similar to `inttype *`. https://reviews.llvm.org/D44044 https://reviews.llvm.org/D45601 ___

[PATCH] D38615: [libclang] Only mark CXCursors for explicit attributes with a type

2018-04-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek accepted this revision. klimek added a comment. This revision is now accepted and ready to land. lg https://reviews.llvm.org/D38615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
kpw added a comment. My editor got a bit carried away with automatically clang-formatting lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the revision history. Repository: rC Clang https://reviews.llvm.org/D45716 ___

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In https://reviews.llvm.org/D45716#1069557, @kpw wrote: > My editor got a bit carried away with automatically clang-formatting > lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the > revision history. Yes please. :) Also, if you can add to

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 142740. devnexen added a comment. - Making base gcc 4.2.1 stdc++ having profile version supported as well. https://reviews.llvm.org/D45662 Files: lib/Driver/ToolChains/OpenBSD.cpp lib/Driver/ToolChains/OpenBSD.h Index:

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D45716#1069567, @dberris wrote: > In https://reviews.llvm.org/D45716#1069557, @kpw wrote: > > > My editor got a bit carried away with automatically

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2018-04-17 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Huch, seems already submitted. Ignore :> Repository: rL LLVM https://reviews.llvm.org/D36390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45692: [clangd] Fix "fail to create file URI" warnings in FileIndexTest.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330182: [clangd] Fix fail to create file URI warnings in FileIndexTest. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[clang-tools-extra] r330182 - [clangd] Fix "fail to create file URI" warnings in FileIndexTest.

2018-04-17 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Apr 17 01:34:50 2018 New Revision: 330182 URL: http://llvm.org/viewvc/llvm-project?rev=330182=rev Log: [clangd] Fix "fail to create file URI" warnings in FileIndexTest. Summary: When running the FileIndexTest, it shows "Failed to create an URI for file XXX: not a valid

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

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D45444#1069488, @shuaiwang wrote: > I've updated https://reviews.llvm.org/D45679 and I think the `isModified()` > function there is now sufficiently covering the cases you've covered here and > can be used as a good starting version if you

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Short note here too: I think having `isModified` return a track record, like a vector for each 1. modifications 2. non-const handle taking 3. (const usages) would be nice. Every user can decide how to react to it. Then the function would be more like `usageRecord`

[PATCH] D45717: [clangd] Using index for GoToDefinition.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: MaskRay, ioeric, jkorous-apple, ilya-biryukov, klimek. This patch adds index support for GoToDefinition -- when we don't get the definition from local AST, we query our index (Static) index to get it.

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. *hust* /llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp I will check this one first, before we get crazy and implemented something twice. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679

[PATCH] D41228: [ObjC] Enable __strong pointers in structs under ARC

2018-04-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. It looks like this caused a clang-cl regression https://bugs.llvm.org/show_bug.cgi?id=37146 "clang-cl emits special functions for non-trivial C-structs ('__destructor_8') introduced for Objective-C". Repository: rL LLVM https://reviews.llvm.org/D41228

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45665: [builtin-dump-struct] printf formats generation testing

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel added a comment. In https://reviews.llvm.org/D45665#1069075, @aaron.ballman wrote: > LGTM! Nice to hear ! As for the last time, as I don't have any rights to push this, I would really appreciate if you could do it for me ! :) Repository: rC Clang https://reviews.llvm.org/D45665

[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2018-04-17 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Herald added a subscriber: llvm-commits. Ping Repository: rL LLVM https://reviews.llvm.org/D36390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/read_file_config.cpp:1 +// RUN: mkdir -p %T/read-file-config/ +// RUN: cp %s %T/read-file-config/test.cpp Will this work on windows? Repository: rCTE Clang Tools Extra

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. A random data point from trying this patch on the LibreOffice code base: - a little over 100 cases that are easily identified as false positives (many of the form "if (p) *p = ...") - two or three cases that looked suspicious on first glance but turned out to be false

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45662: Fuzzer, add libcxx for OpenBSD

2018-04-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[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-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142739. shuaiwang added a comment. Change to just add a helper function `isModified` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h

r330184 - Add some infuriatingly necessary comments to this test case.

2018-04-17 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Tue Apr 17 04:08:05 2018 New Revision: 330184 URL: http://llvm.org/viewvc/llvm-project?rev=330184=rev Log: Add some infuriatingly necessary comments to this test case. Without these comments, by "luck" the contents of SomeKit's SKWidget.h are precisely the same as

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/read_file_config.cpp:5 +// RUN: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "%T/read-file-config", "file": "%T/read-file-config/test.cpp"}]' > %T/read-file-config/compile_commands.json +// RUN:

[PATCH] D45665: [builtin-dump-struct] printf formats generation testing

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've committed in r330185, thank you for the patch! Repository: rC Clang https://reviews.llvm.org/D45665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7806 + "comparing %0 as a boolean">, + InGroup; def warn_format_argument_needs_cast : Warning< thakis wrote: > lebedev.ri wrote: > > Also, this really really should be

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Could you elaborate on why the old behaviour is broken? Repository: rC Clang https://reviews.llvm.org/D42966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D42966: Fix USR generation in the presence of #line directives or linemarkes

2018-04-17 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Sure. Basically, the previous code would not generate the USR for the function's parameters. The issue was that SM.getFileEntryForID would return NULL because there is no actual file, that's why I changed to get the presumedLoc and build the name using the

[PATCH] D43341: [clang-doc] Implement reducer portion of the frontend framework

2018-04-17 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. OK, I didn't get through all the detail, but we should talk about the MR stuff today :) Comment at: clang-doc/BitcodeReader.cpp:25 +void ClangDocBitcodeReader::storeData(SymbolID , llvm::StringRef Blob) { + assert(Record[0] == 20); + // First

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Definitely some interesting questions to take to CWG here. :) Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) +

[PATCH] D45718: Allow registering custom statically-linked analyzer checkers

2018-04-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. alexfh added a reviewer: george.karpenkov. Herald added a subscriber: a.sidorin. Add an extension point to allow registration of statically-linked Clang Static Analyzer checkers that are not a part of the Clang tree. This extension point employs the mechanism used

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Paul Semel via Phabricator via cfe-commits
paulsemel updated this revision to Diff 142750. paulsemel added a comment. Removed the two existing types. Added the correct format sizing. Added tests for those formats. These version is now relying on the previous patch : https://reviews.llvm.org/D45665 Repository: rC Clang

r330185 - Add checks for format specifiers used by __builtin_dump_struct and added a new specifier for null-terminated constant strings.

2018-04-17 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Apr 17 04:57:47 2018 New Revision: 330185 URL: http://llvm.org/viewvc/llvm-project?rev=330185=rev Log: Add checks for format specifiers used by __builtin_dump_struct and added a new specifier for null-terminated constant strings. Patch by Paul Semel. Modified:

[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

2018-04-17 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9816 +RHS = S.ImpCastExprToType(RHS.get(), Type, CK_BitCast); + } else { +// C++2a [expr.spaceship]p4 EricWF wrote: > rsmith wrote: > > We still need to apply the usual arithmetic

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

2018-04-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In https://reviews.llvm.org/D45532#1068700, @Szelethus wrote: > In https://reviews.llvm.org/D45532#1068647, @dkrupp wrote: > > > This bug report also mentions assignment operator. But for that a warning > > may be not so useful. In that case the members of the

[PATCH] D45680: [C++2a] Add operator<=> Rewriting - Early Attempt

2018-04-17 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: lib/Sema/SemaOverload.cpp:9218-9219 +// --- F2 is a rewritten candidate ([over.match.oper]) and F1 is not. +if (Cand2.getRewrittenKind() && !Cand1.getRewrittenKind()) + return true; +if (Cand1.getRewrittenKind() &&

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

2018-04-17 Thread Whisperity via Phabricator via cfe-commits
whisperity requested changes to this revision. whisperity added a comment. This revision now requires changes to proceed. There is something that came up in my mind: Consider a construct like this: class A { A() { memset(X, 0, 10 * sizeof(int)); } int X[10]; }; I

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

2018-04-17 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus updated this revision to Diff 142760. Szelethus added a comment. In https://reviews.llvm.org/D45532#1068700, @Szelethus wrote: > Also, I managed to cause a crash with the class `linked_ptr_internal` from > google's boringssl when I analyzed the grpc project. I'll look deeper into >

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:7806 + "comparing %0 as a boolean">, + InGroup; def warn_format_argument_needs_cast : Warning< lebedev.ri wrote: > Also, this really really should be under it's own flag,

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Thank you for investigating and fixing this! One comment re: the test below. Comment at: test/clang-tidy/read_file_config.cpp:5 +// RUN: echo '[{"command": "cc -c

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

2018-04-17 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. In https://reviews.llvm.org/D45532#1069683, @whisperity wrote: > There is something that came up in my mind: > > Consider a construct like this: > > class A > { > A() > { > memset(X, 0, 10 * sizeof(int)); > } > > int X[10]; > }; > > > I think

[PATCH] D45619: [Time-report] (1) Use special new Clang flag 'FrontendTimesIsEnabled' instead of 'llvm::TimePassesIsEnabled' inside -ftime-report feature

2018-04-17 Thread Andrew V. Tischenko via Phabricator via cfe-commits
avt77 updated this revision to Diff 142755. avt77 added a comment. I moved FrontendTiming.cpp from lib/Basic/ to lib/Frontend/. https://reviews.llvm.org/D45619 Files: include/clang/Frontend/Utils.h lib/CodeGen/BackendUtil.cpp lib/CodeGen/CodeGenAction.cpp lib/Frontend/CMakeLists.txt

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 142759. hokein marked an inline comment as done. hokein added a comment. Add one more test to ensure the test code triggering "clang-analyzer-*" checks. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45697 Files:

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: test/clang-tidy/read_file_config.cpp:1 +// RUN: mkdir -p %T/read-file-config/ +// RUN: cp %s %T/read-file-config/test.cpp JonasToth wrote: > Will this work on windows? I believe it works on windows (although I don't have

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

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. The NEON Intrinsics Reference (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0073a/index.html) reads like they are AArch64-only. https://reviews.llvm.org/D45668 ___ cfe-commits mailing list

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! I will go ahead and commit on your behalf. Btw, if you're thinking of making additional patches, now might be a good time to ask for commit privileges

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. In https://reviews.llvm.org/D45679#1069638, @JonasToth wrote: > *hust* /llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp > > I will check this one first, before we get crazy and implemented something > twice. But this is IR-level analysis. Clang has own

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-17 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky created this revision. mike.dvoretsky added reviewers: craig.topper, spatel. Herald added a subscriber: cfe-commits. This patch lowers the X86 vector packing with saturation intrinsics to native LLVM IR. Comes with an LLVM patch. Repository: rC Clang

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Aditya Kumar via Phabricator via cfe-commits
hiraditya updated this revision to Diff 142776. hiraditya added a comment. Warn on bool* to bool conversion during a call only. https://reviews.llvm.org/D45601 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaChecking.cpp test/SemaCXX/warn-bool-ptr-to-bool.cpp Index:

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

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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: > >

r330188 - Add modifiers for unsigned char and signed char field printing for __builtin_dump_struct.

2018-04-17 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Apr 17 07:00:06 2018 New Revision: 330188 URL: http://llvm.org/viewvc/llvm-project?rev=330188=rev Log: Add modifiers for unsigned char and signed char field printing for __builtin_dump_struct. Patch by Paul Semel. Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp

[PATCH] D45615: [builtins] __builtin_dump_struct : added more types format

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in r330188, thank you for the patch! Repository: rC Clang https://reviews.llvm.org/D45615 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)

2018-04-17 Thread Mikhail Dvoretckii via Phabricator via cfe-commits
mike.dvoretsky created this revision. mike.dvoretsky added reviewers: craig.topper, spatel. Herald added a subscriber: cfe-commits. This patch lowers the SAD intrinsics to native LLVM IR. Comes with an LLVM patch. Repository: rC Clang https://reviews.llvm.org/D45722 Files:

[PATCH] D45441: [HIP] Add predefined macros __HIPCC__ and __HIP_DEVICE_COMPILE__

2018-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/Frontend/InitPreprocessor.cpp:473 + Builder.defineMacro("__HIP_DEVICE_COMPILE__"); + } } rjmccall wrote: > I assume these names are defined by the HIP spec. Yes these

r330194 - [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Tue Apr 17 09:39:25 2018 New Revision: 330194 URL: http://llvm.org/viewvc/llvm-project?rev=330194=rev Log: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds Summary: The clang driver option -save-temps was not passed to the LTO config, so when

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

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330195: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only (authored by kosarev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r330195 - [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only

2018-04-17 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Tue Apr 17 09:43:07 2018 New Revision: 330195 URL: http://llvm.org/viewvc/llvm-project?rev=330195=rev Log: [NEON] Define vget_high_f16() and vget_low_f16() intrinsics in AArch64 mode only Differential Revision: https://reviews.llvm.org/D45668 Modified:

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330194: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds (authored by tejohnson, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2018-04-17 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added a comment. In https://reviews.llvm.org/D35068#1049530, @george.karpenkov wrote: > @koldaniel Have you evaluated this checker? On which codebases? Were the > warnings real security issues, or were they mostly spurious? The code seems > fine, but I'm not sure whether it should be

[PATCH] D45726: Format closing braces when reformatting the line containing theopening brace.This required a couple of yaks to be shaved:1. MatchingOpeningBlockLineIndex was misused to also store the

2018-04-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek created this revision. klimek added a reviewer: krasimir. ...doesn't work correctly for "} else {". 2. We needed to change the API of AffectedRangeManager to not use iterators; we always passed in begin / end for the whole container before, so there was no mismatch in generality. 3.

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142790. kpw added a comment. Undoing formatting change. Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def include/clang/Basic/LangOptions.def include/clang/Basic/XRayInstr.h include/clang/Driver/Options.td

[PATCH] D44882: [clangd] Implementation of workspace/symbol request

2018-04-17 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle added a comment. Any objections to the latest version? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45679: [clang-tidy] Add a helper function isModified, that checks whether an expression is modified within a statement.

2018-04-17 Thread Shuai Wang via Phabricator via cfe-commits
shuaiwang updated this revision to Diff 142882. shuaiwang added a comment. Better range for loop handling. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45679 Files: clang-tidy/utils/ASTUtils.cpp clang-tidy/utils/ASTUtils.h unittests/clang-tidy/CMakeLists.txt

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

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330187: [NEON] Fix the architecture condition for the crypto intrinsics (authored by kosarev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added inline comments. This revision is now accepted and ready to land. Comment at: test/clang-tidy/read_file_config.cpp:5 +// RUN: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "%T/read-file-config", "file":

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

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330187: [NEON] Fix the architecture condition for the crypto intrinsics (authored by kosarev, committed by ). Repository: rL LLVM https://reviews.llvm.org/D45669 Files:

r330187 - [NEON] Fix the architecture condition for the crypto intrinsics

2018-04-17 Thread Ivan A. Kosarev via cfe-commits
Author: kosarev Date: Tue Apr 17 06:37:30 2018 New Revision: 330187 URL: http://llvm.org/viewvc/llvm-project?rev=330187=rev Log: [NEON] Fix the architecture condition for the crypto intrinsics Differential Revision: https://reviews.llvm.org/D45669 Modified:

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

2018-04-17 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Yep, agreed, also on the new shiny https://developer.arm.com/technologies/neon/intrinsics it is listed as A64 only. https://reviews.llvm.org/D45668

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

2018-04-17 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev updated this revision to Diff 142784. kosarev added a comment. Removed checks for unused bitcasts. Thanks for catching! https://reviews.llvm.org/D45670 Files: include/clang/Basic/arm_neon.td test/CodeGen/arm-neon-fma.c Index: test/CodeGen/arm-neon-fma.c

r330201 - Move the visitor classes that are used to traverse non-trivial C structs

2018-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 17 12:05:17 2018 New Revision: 330201 URL: http://llvm.org/viewvc/llvm-project?rev=330201=rev Log: Move the visitor classes that are used to traverse non-trivial C structs to a header file. This is in preparation for using the visitor classes to warn about

[libclc] r330207 - powr: Use denormal path only

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 12:35:32 2018 New Revision: 330207 URL: http://llvm.org/viewvc/llvm-project?rev=330207=rev Log: powr: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Fixes

[libclc] r330206 - pown: Use denormal path only

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 12:35:30 2018 New Revision: 330206 URL: http://llvm.org/viewvc/llvm-project?rev=330206=rev Log: pown: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Fixes

[libclc] r330205 - pow: Use denormal path only

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 12:35:28 2018 New Revision: 330205 URL: http://llvm.org/viewvc/llvm-project?rev=330205=rev Log: pow: Use denormal path only It's OK to either flush to 0 or return denormal result if the device does not support denormals. See sec 7.2 and 7.5.3 of OCL specs Fixes

[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

2018-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 142818. yaxunl marked an inline comment as done. yaxunl retitled this revision from "[HIP] Add hip file type and codegen for kernel launching" to "[HIP] Add hip input kind and codegen for kernel launching". yaxunl edited the summary of this revision. yaxunl

[PATCH] D45697: [clang-tidy] Fix clang-tidy doesn't read .clangtidy configuration file.

2018-04-17 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 142817. hokein marked an inline comment as done. hokein added a comment. Make grep pattern more obvious. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45697 Files: clang-tidy/ClangTidyOptions.cpp clang-tidy/ClangTidyOptions.h

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3270 + if (const Arg *A = Args.getLastArg(options::OPT_save_temps_EQ)) +Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ); bjope wrote: > A is not used, so this does

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 142811. devnexen retitled this revision from "Fuzzer, add libcxx for OpenBSD" to "OpenBSD add C++ runtime in a driver's standpoint". devnexen edited the summary of this revision. https://reviews.llvm.org/D45662 Files: lib/Driver/ToolChains/OpenBSD.cpp

[PATCH] D45662: OpenBSD add C++ runtime in a driver's standpoint

2018-04-17 Thread David CARLIER via Phabricator via cfe-commits
devnexen added inline comments. Comment at: lib/Driver/ToolChains/OpenBSD.cpp:189 if (getToolChain().ShouldLinkCXXStdlib(Args)) -getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs); +ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); if

[PATCH] D45310: Warn about memcpy'ing non-trivial C structs

2018-04-17 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330202: [Sema] Warn about memcpying non-trivial C structs. (authored by ahatanak, committed by ). Changed prior to commit: https://reviews.llvm.org/D45310?vs=142705=142815#toc Repository: rC Clang

r330202 - [Sema] Warn about memcpy'ing non-trivial C structs.

2018-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 17 12:13:41 2018 New Revision: 330202 URL: http://llvm.org/viewvc/llvm-project?rev=330202=rev Log: [Sema] Warn about memcpy'ing non-trivial C structs. Issue a warning when non-trivial C structs are copied or initialized by calls to memset, bzero, memcpy, or

[PATCH] D44984: [HIP] Add hip file type and codegen for kernel launching

2018-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: lib/Frontend/CompilerInvocation.cpp:2109 + Opts.HIP = true; + } + rjmccall wrote: > yaxunl wrote: > > rjmccall wrote: > > > Why is this done here? We infer the language

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3270 + if (const Arg *A = Args.getLastArg(options::OPT_save_temps_EQ)) +Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ); A is not used, so this does not compile when

[PATCH] D45290: [Driver] Use the per-API level Android library directories.

2018-04-17 Thread Dan Albert via Phabricator via cfe-commits
danalbert marked an inline comment as done. danalbert added inline comments. Comment at: lib/Driver/ToolChains/Linux.cpp:25 #include "llvm/Support/Path.h" +#include "llvm/Support/ScopedPrinter.h" #include eugenis wrote: > I don't see why this include is

r330210 - Remove unused variable

2018-04-17 Thread Teresa Johnson via cfe-commits
Author: tejohnson Date: Tue Apr 17 13:21:53 2018 New Revision: 330210 URL: http://llvm.org/viewvc/llvm-project?rev=330210=rev Log: Remove unused variable Fixes unused variable error introduced in r330194. Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp Modified:

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-17 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: cfe/trunk/lib/Driver/ToolChains/Clang.cpp:3270 + if (const Arg *A = Args.getLastArg(options::OPT_save_temps_EQ)) +Args.AddLastArg(CmdArgs, options::OPT_save_temps_EQ); tejohnson wrote: > bjope wrote: > > A is

[libclc] r330197 - exp10: Port from amd builtins

2018-04-17 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Tue Apr 17 11:08:08 2018 New Revision: 330197 URL: http://llvm.org/viewvc/llvm-project?rev=330197=rev Log: exp10: Port from amd builtins Passes CTS on carrizo and turks. Signed-off-by: Jan Vesely Reviewed and Tested (on RX 580) by: Aaron Watry

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. The thing about the bool*-only version is that bool pointers are rare in C++, so I'm not sure we're gaining much. But if we can't do something more general, there's still some benefit. I see your point about false positives for the more general version. I was sort

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: lib/Sema/SemaChecking.cpp:2623 +QualType QT = Pointer->getType()->getPointeeType(); +if (!QT.isNull() && QT->isBooleanType()) + // Warn on bool* to bool conversion.

r330199 - Add a command line option 'fregister_global_dtors_with_atexit' to

2018-04-17 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 17 11:41:52 2018 New Revision: 330199 URL: http://llvm.org/viewvc/llvm-project?rev=330199=rev Log: Add a command line option 'fregister_global_dtors_with_atexit' to register destructor functions annotated with __attribute__((destructor)) using __cxa_atexit or

[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-17 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330199: Add a command line option fregister_global_dtors_with_atexit to (authored by ahatanak, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D45720: [X86] Lowering PACK*S (pack with saturation) intrinsics to native IR (clang side)

2018-04-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8420 + if (IsUnsigned) { +MinVal = (IsDW) ? llvm::APInt::getMinValue(16).getZExtValue() +: llvm::APInt::getMinValue(8).getZExtValue(); Why can't these just be

[PATCH] D45382: [CodeGen] Avoid destructing a struct type that has already been destructed by a delegated constructor

2018-04-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 142792. ahatanak added a comment. Deactivate the cleanups for callee-destructed parameters that are being forwarded to a delegated constructor. I also added a new member (CurrentCleanupStackDepth) to CodeGenFunction that tracks the stack depth of the most

[PATCH] D45601: Warn on bool* to bool conversion

2018-04-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:2623 +QualType QT = Pointer->getType()->getPointeeType(); +if (!QT.isNull() && QT->isBooleanType()) + // Warn on bool* to bool conversion.

  1   2   >