[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: include/clang-c/Index.h:4118 + */ +CINDEX_LINKAGE unsigned clang_PrintingPolicy_getIndentation(CXPrintingPolicy); + Could one use an enum to get/set different properties of the policy? ``` clang_PrintingPolicy_get(CXPrint

[PATCH] D41792: [AArch64] Add ARMv8.2-A FP16 scalar intrinsics

2018-01-11 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/include/clang/Basic/arm_fp16.td:58 +class IInst : Inst {} + +// ARMv8.2-A FP16 intrinsics. az wrote: > SjoerdMeijer wrote: > > There's a little bit of duplication here: the definitions above are the > > same

[PATCH] D41938: [Analyzer] SValBuilder Comparison Rearrangement (with Restrictions and Analyzer Option)

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, dcoughlin. Herald added subscribers: a.sidorin, szepet. This patch is a "light" version of https://reviews.llvm.org/D35109: Since the range-based constraint manager (default) is weak in handling comparisons where

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D35110#972430, @NoQ wrote: > In https://reviews.llvm.org/D35110#969782, @baloghadamsoftware wrote: > > > Strange, but modifying the tests from `m n` to `m - n > > 0` does not help. The statement `if (m - n 0)` does not store a

[PATCH] D38639: [clangd] #include statements support for Open definition

2018-01-11 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.h:51 +using IncludeReferenceMap = std::unordered_map; + We use `unordered_map` as a `vector>` here. (i.e. we never look up values by key, because we don't only the range, merely a point in the

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw created this revision. ncw added reviewers: sunfish, dschuff. Herald added subscribers: cfe-commits, aheejin, jgravelle-google, sbc100, jfb. See: https://bugs.llvm.org/show_bug.cgi?id=35582 Since Wasm has to use 32-to-16 bit instructions to narrow values down, 32-bit should be a tad faster f

r322268 - [Lex] Use WritableMemoryBuffer in ScratchBuffer.cpp

2018-01-11 Thread Pavel Labath via cfe-commits
Author: labath Date: Thu Jan 11 02:43:45 2018 New Revision: 322268 URL: http://llvm.org/viewvc/llvm-project?rev=322268&view=rev Log: [Lex] Use WritableMemoryBuffer in ScratchBuffer.cpp This avoids the need to const_cast the buffer contents to write to it. NFCI. Modified: cfe/trunk/lib/Lex/S

[PATCH] D41897: Fixing a crash in Sema.

2018-01-11 Thread Jan Korous via Phabricator via cfe-commits
jkorous-apple updated this revision to Diff 129284. jkorous-apple added a comment. Changes based on Aaron's feedback. https://reviews.llvm.org/D41897 Files: Sema/SemaDeclCXX.cpp SemaCXX/base-class-ambiguity-check.cpp Index: SemaCXX/base-class-ambiguity-check.cpp ==

[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Szabolcs Nagy via Phabricator via cfe-commits
nsz added a comment. if clang wants to provide _Float128 then the f128 constant suffix (specified by TS18661-3) and __builtin_inff128, __builtin_nanf128, __builtin_nansf128, __builtin_huge_valf128 (gcc builtins required by math.h) need to be supported too. as this patch is committed clang is b

[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Szabolcs Nagy via Phabricator via cfe-commits
nsz added a comment. also note that there is less than 3 weeks until glibc-2.27 is released, if the headers need a fix for clang then say so quickly i opened https://sourceware.org/bugzilla/show_bug.cgi?id=22700 but it needs attention from some clang developers, in particular there is no way to

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 129426. nik added a comment. > Could one use an enum to get/set different properties of the policy? > > I've seen other C-API's (for Linear and Quadratic programming) follow a > similar approach quite extensibly. > > It would significantly reduce the size of th

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 129427. nik added a comment. Used macros as in a previous version to make it less verbose and error prone. Repository: rC Clang https://reviews.llvm.org/D39903 Files: include/clang-c/Index.h test/Index/print-display-names.cpp tools/c-index-test/c-index

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:22 + if (getLangOpts().CPlusPlus) +Finder->addMatcher(gotoStmt().bind("goto"), this); +} aaron.ballman wrote: > JonasToth wrote: > > aaron.ballman wrote: > > > aaron

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 129433. JonasToth added a comment. I enhanced the check to do more: - check that jumps will only be forward. AFAIK that is required in all sensefull usecases of goto, is it? - additionally check for gotos in nested loops. These are not diagnosed if the ju

[clang-tools-extra] r322274 - [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces

2018-01-11 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Thu Jan 11 05:00:28 2018 New Revision: 322274 URL: http://llvm.org/viewvc/llvm-project?rev=322274&view=rev Log: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces Summary: Fixes bug 34701 When we encounter a namespace find the locatio

[PATCH] D38284: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested namespaces

2018-01-11 Thread Alexander Kornienko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322274: [clang-tidy] Fix google-readability-namespace-comments handling of C++17 nested… (authored by alexfh, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit: ht

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D41815#973260, @JonasToth wrote: > - check that jumps will only be forward. AFAIK that is required in all > sensefull usecases of goto, is it? You could implement loops/recursion with goto, something like: const int end = 10; int i =

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin accepted this revision. a.sidorin added inline comments. Comment at: test/Analysis/NewDelete-path-notes.cpp:44 // CHECK-NEXT: -// CHECK-NEXT:line6 +// CHECK-NEXT:line7 // CHECK-NEXT:col3 Not even a minor

[PATCH] D30691: [analyzer] Support for naive cross translational unit analysis

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Had a fresh look on the C++ part, it is super clean now, i'm very impressed :) Comment at: lib/StaticAnalyzer/Core/CallEvent.cpp:373-374 - return RuntimeDefinition(); + auto Engine = static_cast( + getState()->getStateManager().getOwningEngine());

[PATCH] D39963: [RISCV] Add initial RISC-V target and driver support

2018-01-11 Thread Alex Bradbury via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC322276: [RISCV] Add the RISCV target and compiler driver (authored by asb, committed by ). Changed prior to commit: https://reviews.llvm.org/D39963?vs=126771&id=129436#toc Repository: rC Clang https

[PATCH] D41946: [clangd] Add support for different file URI schemas.

2018-01-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: sammccall. Herald added subscribers: cfe-commits, ilya-biryukov, mgorny, klimek. DO NOT SUBMIT: We should replace the existing URI struct in Protocol.h with the new URI and rename FileURI to URI. But before doing that, I'd like to early feedba

[PATCH] D41947: Provide default virtual filesystem argument in ClangTool constructor

2018-01-11 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun created this revision. vladimir.plyashkun added reviewers: alexfh, ilya-biryukov. vladimir.plyashkun added a project: clang. Herald added a subscriber: klimek. This revision is part of another review. Check this link for more details - https://reviews.llvm.org/D41535 Repositor

[PATCH] D41535: Add -vfsoverlay option for Clang-Tidy

2018-01-11 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun updated this revision to Diff 129440. vladimir.plyashkun added a reviewer: ilya-biryukov. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41535 Files: clang-tidy/ClangTidy.cpp clang-tidy/ClangTidyDiagnosticConsumer.h clang-tidy/ClangTidyOptions.cpp clang

[PATCH] D41535: Add -vfsoverlay option for Clang-Tidy

2018-01-11 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun added a comment. Second part here (provided default virtual filesystem argument to ClangTool constructor): https://reviews.llvm.org/D41947 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41535 ___ cfe-commits mail

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 129441. baloghadamsoftware added a comment. Updated to be based upon https://reviews.llvm.org/D41938. https://reviews.llvm.org/D35110 Files: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp test/Analysis/constraint_manager_negate_difference

r322278 - [OpenCL] Reorder the CLK_sRGBx/sRGBA defines, NFC

2018-01-11 Thread Sven van Haastregt via cfe-commits
Author: svenvh Date: Thu Jan 11 06:05:38 2018 New Revision: 322278 URL: http://llvm.org/viewvc/llvm-project?rev=322278&view=rev Log: [OpenCL] Reorder the CLK_sRGBx/sRGBA defines, NFC Swap them so that all channel order defines are ordered according to their values. Modified: cfe/trunk/lib/He

[PATCH] D32642: [Analyzer] Iterator Checker - Part 2: Increment, decrement operators and ahead-of-begin checks

2018-01-11 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 129445. baloghadamsoftware added a comment. Updated to be based upon https://reviews.llvm.org/D41938 and https://reviews.llvm.org/D35110. https://reviews.llvm.org/D32642 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp test/Analysis/In

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A couple of nits, but other than that, looks fine. Comment at: libcxx/include/istream:970 } +if (__n > 0) +{ I'm not a big fan of "putting braces around single statement blocks", and (see line 963) that doe

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2018-01-11 Thread Will Dietz via Phabricator via cfe-commits
dtzWill added a comment. Ping! Is this stalling on reviewer attention? If so, please submit to LLVM Weekly's review corner (assuming it works with current LLVM), see http://llvmweekly.org/reviewcorner for details. Repository: rL LLVM https://reviews.llvm.org/D28462 __

[PATCH] D41816: [analyzer] Model and check unrepresentable left shifts

2018-01-11 Thread Reka Kovacs via Phabricator via cfe-commits
rnkovacs updated this revision to Diff 129448. rnkovacs added a comment. I extended the warning message to include more information. What do you think? https://reviews.llvm.org/D41816 Files: lib/StaticAnalyzer/Checkers/UndefResultChecker.cpp lib/StaticAnalyzer/Core/BasicValueFactory.cpp t

[PATCH] D40677: [libcxx] Make std::basic_istream::get 0-terminate input array in case of error.

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. Please make the formatting match the rest of the file. Comment at: libcxx/test/std/input.output/iostream.format/input.streams/istream.unformatted/get_pointer_size_

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2018-01-11 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. ping! Thanks for your consideration Repository: rC Clang https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp:67 non_empty_dir, -file_in_bad_dir, +// file_in_bad_dir, // produces "St13exception_ptruncaught_exceptions not yet implemented"

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Ekaterina Vaartis via Phabricator via cfe-commits
TyanNN updated this revision to Diff 129453. TyanNN added a comment. Fix tests https://reviews.llvm.org/D41830 Files: src/experimental/filesystem/operations.cpp test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp test/std/experimental/filesystem/fs.op.funcs/fs.op.re

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Ekaterina Vaartis via Phabricator via cfe-commits
TyanNN added inline comments. Comment at: test/std/experimental/filesystem/fs.op.funcs/fs.op.remove/remove.pass.cpp:67 non_empty_dir, -file_in_bad_dir, +// file_in_bad_dir, // produces "St13exception_ptruncaught_exceptions not yet implemented" }; -

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. It might be worth adding some very simple get/set tests to ensure that properties are set as intended. Comment at: tools/libclang/CIndex.cpp:4720 + +#define HANDLE_CASE(P, PROPERTY_NAME) \ + case CXPrintingPolic

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists accepted this revision. mclow.lists added a comment. This revision is now accepted and ready to land. LGTM. Do you need me to commit this? https://reviews.llvm.org/D41830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Ekaterina Vaartis via Phabricator via cfe-commits
TyanNN added a comment. In https://reviews.llvm.org/D41830#973419, @mclow.lists wrote: > LGTM. > > Do you need me to commit this? Nope, i can do it myself https://reviews.llvm.org/D41830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322293: Make std::experimental::filesystem::remove and remove_all return false or 0 if… (authored by vaartis, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://re

[libcxx] r322295 - Fix some too-big local arrays. Thanks to dcdillon for the patch. Reviewed as D28217

2018-01-11 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Jan 11 09:16:52 2018 New Revision: 322295 URL: http://llvm.org/viewvc/llvm-project?rev=322295&view=rev Log: Fix some too-big local arrays. Thanks to dcdillon for the patch. Reviewed as D28217 Modified: libcxx/trunk/src/locale.cpp Modified: libcxx/trunk/src/locale.

[PATCH] D28217: [libc++] Overallocation of am_pm array in locale.cpp

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as r322295 https://reviews.llvm.org/D28217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/NewDelete-path-notes.cpp:44 // CHECK-NEXT: -// CHECK-NEXT:line6 +// CHECK-NEXT:line7 // CHECK-NEXT:col3 a.sidorin wrote: > Not even a minor concern for this patc

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly uses

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-11 Thread Aleksei Sidorin via Phabricator via cfe-commits
a.sidorin added inline comments. Comment at: test/Analysis/NewDelete-path-notes.cpp:44 // CHECK-NEXT: -// CHECK-NEXT:line6 +// CHECK-NEXT:line7 // CHECK-NEXT:col3 NoQ wrote: > a.sidorin wrote: > > Not even a minor

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly uses

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 129465. leanil added a comment. Change result types to match the query return types. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax-checks.m Index: test/Analysis/security-syn

[PATCH] D41952: Clang test changes for 'no-overflow' flag for sdiv\udiv instructions

2018-01-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. erichkeane added reviewers: magabari, zvi, craig.topper, DavidKreitzer, hsaito, nlopes, reames, MatzeB, eli.friedman, rengolin, hfinkel. Herald added subscribers: kbarton, nemanjai. See: https://reviews.llvm.org/D41944 These are the Clang CodeGen test changes req

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Nicholas Wilson via Phabricator via cfe-commits
ncw added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly uses

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-11 Thread Weiming Zhao via Phabricator via cfe-commits
weimingz added a comment. any suggestions? Repository: rCXX libc++ https://reviews.llvm.org/D41316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-11 Thread Ana Pazos via Phabricator via cfe-commits
apazos updated this revision to Diff 129476. apazos added a comment. Herald added a subscriber: niosHD. Rebased. https://reviews.llvm.org/D41271 Files: lib/Driver/ToolChains/Gnu.cpp test/Driver/riscv-gnutools.c Index: test/Driver/riscv-gnutools.c ==

[PATCH] D41941: [WebAssembly] Change int_fast16_t to 32-bit

2018-01-11 Thread Derek Schuff via Phabricator via cfe-commits
dschuff added inline comments. Comment at: lib/Basic/Targets/WebAssembly.h:108 IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const final { -// WebAssembly uses long long for int_least64_t and int_fast64_t. -return BitWidth == 64 +// WebAssembly

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-01-11 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. > Should we go with current patch? You'll need a bunch of `UNSUPPORTED: has-no-random-device` or something like it, but other than that, I'm happy with the patch as-is. Repository: rCXX libc++ https://reviews.llvm.org/D41316 _

[PATCH] D41271: [RISCV] Propagate -mabi and -march values to GNU assembler.

2018-01-11 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. I've just had a painful time landing https://reviews.llvm.org/D39963 due to failures on the Windows buildbots. I think you'll have problems on Windows with the tests in this patch, as Windows surely won't default to /usr/bin/as. Sadly I don't have access to a windows Clang

r322276 - [RISCV] Add the RISCV target and compiler driver

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 05:36:56 2018 New Revision: 322276 URL: http://llvm.org/viewvc/llvm-project?rev=322276&view=rev Log: [RISCV] Add the RISCV target and compiler driver As RV64 codegen has not yet been upstreamed into LLVM, we focus on RV32 driver support (RV64 to follow). Differentia

r322277 - [Driver][RISCV] Fix r322276 by adding missing dummy crtbegin.o files to test input

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 05:51:06 2018 New Revision: 322277 URL: http://llvm.org/viewvc/llvm-project?rev=322277&view=rev Log: [Driver][RISCV] Fix r322276 by adding missing dummy crtbegin.o files to test input The dummy crtbegin.o files were left out in r322276 (as they were ignored by svn a

r322286 - [Driver][RISCV] Fix r322276 for Windows (path separator issue)

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 07:38:01 2018 New Revision: 322286 URL: http://llvm.org/viewvc/llvm-project?rev=322286&view=rev Log: [Driver][RISCV] Fix r322276 for Windows (path separator issue) We were seeing test failures of riscv32-toolchain.c on windows due to the \ path separator being used f

[libcxx] r322293 - Make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Ekaterina Vaartis via cfe-commits
Author: vaartis Date: Thu Jan 11 09:04:29 2018 New Revision: 322293 URL: http://llvm.org/viewvc/llvm-project?rev=322293&view=rev Log: Make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist Differential Revision: https://reviews.llvm.org/D41830 Mod

r322294 - [Driver][RISCV] Another Windows file separator fix for riscv32-toolchain.c test

2018-01-11 Thread Alex Bradbury via cfe-commits
Author: asb Date: Thu Jan 11 09:06:32 2018 New Revision: 322294 URL: http://llvm.org/viewvc/llvm-project?rev=322294&view=rev Log: [Driver][RISCV] Another Windows file separator fix for riscv32-toolchain.c test I've checking the failure log, this _should_ be the last one. Sorry for not spotting t

[PATCH] D41800: [analyzer] Use a custom program point for the check::NewAllocator callback.

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/NewDelete-path-notes.cpp:44 // CHECK-NEXT: -// CHECK-NEXT:line6 +// CHECK-NEXT:line7 // CHECK-NEXT:col3 a.sidorin wrote: > NoQ wrote: > > a.sidorin wrote: > > >

[PATCH] D41655: [clang-tidy] New check bugprone-unused-return-value

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/bugprone-unused-return-value.cpp:210 + // test that the check is disabled inside GNU statement expressions + ({ std::async(increment, 42); }); + auto StmtExprRetval = ({ std::async(increment, 42); }); ---

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-11 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. Aside from a minor formatting nit that I missed, LGTM! Comment at: clang-tidy/fuchsia/StaticallyConstructedObjectsCheck.cpp:51 +const MatchFinder::MatchResu

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think this approach is a reasonable approximation, but @delesley has the final word. Comment at: lib/Analysis/ThreadSafety.cpp:1994 +static CXXConstructorDecl *findConstructorForByValueReturn(CXXRecordDecl *RD) { + // Prefer a move construct

[PATCH] D41897: Fixing a crash in Sema.

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: SemaCXX/base-class-ambiguity-check.cpp:1 +// RUN: %clang_cc1 -fsyntax-only %s + aaron.ballman wrote: > This run line isn't testing anything. Since you're trying to ensure this > doesn't crash, I would put `-verify

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D41815#973260, @JonasToth wrote: > I enhanced the check to do more: > > - check that jumps will only be forward. AFAIK that is required in all > sensefull usecases of goto, is it? > - additionally check for gotos in nested loops. These a

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:522 + ArraySize = Array->getSize().getLimitedValue(); + if (const auto *String = dyn_cast(Source)) { +StrLen = String->getLength(); Nesting this

[libcxx] r322306 - Implement an _is_allocator type trait for use in deduction guides.

2018-01-11 Thread Marshall Clow via cfe-commits
Author: marshall Date: Thu Jan 11 11:36:22 2018 New Revision: 322306 URL: http://llvm.org/viewvc/llvm-project?rev=322306&view=rev Log: Implement an _is_allocator type trait for use in deduction guides. Added: libcxx/trunk/test/libcxx/memory/ libcxx/trunk/test/libcxx/memory/is_allocator.pa

[PATCH] D41455: [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D41455#963752, @aaron.ballman wrote: > Aside from a documentation nit, this LGTM. However, you should wait to commit > until after you can safely regenerate the AST matcher documentation. The > issue there is that dump_ast_matchers.py was

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + It would be nice to have it in standard ASTMatchers, i believe it will be useful for `else-after-return` check. Though

[PATCH] D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > as this patch is committed clang is broken (cannot use glibc headers) This patch was supposed to *fix* compatibility with the glibc headers. If it doesn't, we should clearly revert it... but we need to figure out what we need to do to be compatible first. From what

[PATCH] D41958: Create a deduction guide for basic_string

2018-01-11 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. mclow.lists added a reviewer: EricWF. First of the C++17 deduction guides (I think). Uses the new `__is_allocator` trait. The failing test is not quite right yet, but the success bits all work. https://reviews.llvm.org/D41958 Files: include/string test/st

Re: [PATCH] D41455: [ASTMatchers] Add isNoReturn() match narrower for FunctionDeclarations

2018-01-11 Thread David Blaikie via cfe-commits
I haven't as yet, no. Sorry - happy if someone else wants to have a go, or I'll take a closer look soon. - Dave On Thu, Jan 11, 2018 at 11:38 AM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri added a comment. > > In https://reviews.llvm.org/D41455#963752, @aaron.ba

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-11 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2012-2015 +// Skip escaped characters. Escaped newlines will already be processed by +// getAndAdvanceChar. +if (C == '\\') + C = getAndAdvanceChar(CurPtr, Result); rsmith wrote:

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 129496. Repository: rC Clang https://reviews.llvm.org/D41933 Files: lib/Analysis/ThreadSafety.cpp test/SemaCXX/warn-thread-safety-analysis.cpp Index: test/SemaCXX/warn-thread-safety-analysis.cpp =

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Analysis/ThreadSafety.cpp:1994 +static CXXConstructorDecl *findConstructorForByValueReturn(CXXRecordDecl *RD) { + // Prefer a move constructor over a copy constructor. If there's more than aaron.ballman wrote: > Ca

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2018-01-11 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett updated this revision to Diff 129498. juliehockett marked 8 inline comments as done. juliehockett added a comment. 1. Updating check and tests to address virtual inheritance 2. Rebasing from trunk https://reviews.llvm.org/D40580 Files: clang-tidy/fuchsia/CMakeLists.txt clang-ti

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:60 + // To be an interface, all base classes must be interfaces as well. + for (const auto &I : Node->bases()) { +const auto *Ty = I.getType()->getAs(); aaron.ballman

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 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, but you should wait for a bit to see if DeLesley has concerns. Comment at: lib/Analysis/ThreadSafety.cpp:1994 +static CXXConstructorDecl *findConstructo

[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

2018-01-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:60 + // To be an interface, all base classes must be interfaces as well. + for (const auto &I : Node->bases()) { +const auto *Ty = I.getType()->getAs(); rsmith

[clang-tools-extra] r322310 - [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-11 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Thu Jan 11 13:17:43 2018 New Revision: 322310 URL: http://llvm.org/viewvc/llvm-project?rev=322310&view=rev Log: [clang-tidy] Adding Fuchsia checker for statically constructed objects Adds a check to the Fuchsia module to warn if statically-stored objects are created, un

[PATCH] D41546: [clang-tidy] Adding Fuchsia checker for statically constructed objects

2018-01-11 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE322310: [clang-tidy] Adding Fuchsia checker for statically constructed objects (authored by juliehockett, committed by ). Changed prior to commit: https://reviews.llvm.org/D41546?vs=129208&id=129505#t

[PATCH] D41423: [Lex] Avoid out-of-bounds dereference in LexAngledStringLiteral.

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:2012-2015 +// Skip escaped characters. Escaped newlines will already be processed by +// getAndAdvanceChar. +if (C == '\\') + C = getAndAdvanceChar(CurPtr, Result);

[PATCH] D41963: [clang-tidy] Adding Fuchsia checker for thread local storage.

2018-01-11 Thread Julie Hockett via Phabricator via cfe-commits
juliehockett created this revision. juliehockett added reviewers: aaron.ballman, alexfh, hokein, ilya-biryukov. juliehockett added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Adds a check to the Fuchsia module to warn if thread-local storage is used. See https://fuc

RE: D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Blower, Melanie via cfe-commits
> -Original Message- > From: Szabolcs Nagy via Phabricator [mailto:revi...@reviews.llvm.org] > Sent: Thursday, January 11, 2018 6:13 AM > To: Blower, Melanie ; Keane, Erich > ; sca...@apple.com; roger.ferreriba...@arm.com; > sjoerd.mei...@arm.com; jle...@google.com; > hubert.reinterpretc.

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread András Leitereg via Phabricator via cfe-commits
leanil updated this revision to Diff 129508. leanil added a comment. Nest condition checking. Add positive test. https://reviews.llvm.org/D41384 Files: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp test/Analysis/security-syntax-checks.m Index: test/Analysis/security-syntax-check

RE: D40673: Add _Float128 as alias to __float128 to enable compilations on Fedora27/glibc2-26

2018-01-11 Thread Blower, Melanie via cfe-commits
> -Original Message- > From: Szabolcs Nagy via Phabricator [mailto:revi...@reviews.llvm.org] > Sent: Thursday, January 11, 2018 6:25 AM > To: Blower, Melanie ; Keane, Erich > ; sca...@apple.com; roger.ferreriba...@arm.com; > sjoerd.mei...@arm.com; jle...@google.com; > hubert.reinterpretc.

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: tools/libclang/libclang.exports:365 +clang_PrintingPolicy_get +clang_PrintingPolicy_set +clang_PrintingPolicy_dispose clang_PrintingPolicy_setProperty and clang_PrintingPolicy_getProperty might be better names (I know the

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread András Leitereg via Phabricator via cfe-commits
leanil marked 3 inline comments as done. leanil added inline comments. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:526 + } + if (StrLenFound && ArraySize >= StrLen + 1) +return; george.karpenkov wrote: > Why not put this if-expressio

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added inline comments. This revision is now accepted and ready to land. Comment at: lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp:517 +if (const auto *Array = dyn_cast( +DeclRef->getDecl()->getType().getTypePtr())) { +

[PATCH] D41384: [analyzer] Suppress false positive warnings form security.insecureAPI.strcpy

2018-01-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Do you have commit access or should someone else commit it for you? https://reviews.llvm.org/D41384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41792: [AArch64] Add ARMv8.2-A FP16 scalar intrinsics

2018-01-11 Thread Abderrazek Zaafrani via Phabricator via cfe-commits
az updated this revision to Diff 129513. az marked 3 inline comments as done. https://reviews.llvm.org/D41792 Files: clang/include/clang/Basic/BuiltinsNEON.def clang/include/clang/Basic/CMakeLists.txt clang/include/clang/Basic/arm_fp16.td clang/include/clang/Basic/arm_neon.td clang/incl

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. In https://reviews.llvm.org/D41815#973265, @lebedev.ri wrote: > In https://reviews.llvm.org/D41815#973260, @JonasToth wrote: > > > - check that jumps will only be forward. AFAIK that is required in all > > sensefull usecases of goto, is it? > > > You could implement lo

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + JonasToth wrote: > lebedev.ri wrote: > > It would be nice to have it in standard ASTMatchers, i believe it will be > >

[PATCH] D41815: [clang-tidy] implement check for goto

2018-01-11 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/cppcoreguidelines/AvoidGotoCheck.cpp:20 + +AST_MATCHER(GotoStmt, isForwardJumping) { + lebedev.ri wrote: > It would be nice to have it in standard ASTMatchers, i believe it will be > useful for `else-after-

[PATCH] D41830: [libc++] Fix PR#35780 - make std::experimental::filesystem::remove and remove_all return false or 0 if the file doesn't exist

2018-01-11 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added inline comments. Comment at: libcxx/trunk/test/std/experimental/filesystem/fs.op.funcs/fs.op.remove_all/remove_all.pass.cpp:86 + +TEST_CHECK(fs::remove_all(p) == 0); +TEST_CHECK(!ec); This test is incorrect. `ec` isn't passed to the

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Delesley Hutchins via Phabricator via cfe-commits
delesley accepted this revision. delesley added a comment. LGTM. Thanks, Richard! Repository: rC Clang https://reviews.llvm.org/D41933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D41933: handle scoped_lockable objects being returned by value in C++17

2018-01-11 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith closed this revision. rsmith added a comment. Committed as r322316. Repository: rC Clang https://reviews.llvm.org/D41933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r322316 - Handle scoped_lockable objects being returned by value in C++17.

2018-01-11 Thread Richard Smith via cfe-commits
Author: rsmith Date: Thu Jan 11 14:13:57 2018 New Revision: 322316 URL: http://llvm.org/viewvc/llvm-project?rev=322316&view=rev Log: Handle scoped_lockable objects being returned by value in C++17. In C++17, guaranteed copy elision means that there isn't necessarily a constructor call when a loca

r322318 - Make internal/private GVs implicitly dso_local.

2018-01-11 Thread Rafael Espindola via cfe-commits
Author: rafael Date: Thu Jan 11 14:15:12 2018 New Revision: 322318 URL: http://llvm.org/viewvc/llvm-project?rev=322318&view=rev Log: Make internal/private GVs implicitly dso_local. While updating clang tests for having clang set dso_local I noticed that: - There are *a lot* of tests to update. -

  1   2   >