[PATCH] D41458: [libc++][C++17] Elementary string conversions for integral types

2018-01-01 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 128393. lichray added a comment. Just include math.h Repository: rCXX libc++ https://reviews.llvm.org/D41458 Files: .gitignore include/charconv include/support/itoa/ include/support/itoa/itoa.h lib/CMakeLists.txt src/support/itoa/

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } aaron.ballman wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } koldaniel wrote: >

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:66-67 +} +Diag << FixItHint::CreateInsertion(BeginLoc.getLocWithOffset(TextLength), + "s"); + } aaron.ballman wrote: >

[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

2018-01-01 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. Branching is approaching rapidly. This needs to land before that. Repository: rC Clang https://reviews.llvm.org/D41512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp:24 + + const char *MatchText = "::std::uncaught_exception"; + You might as well make this a `std::string` rather than `const char *` because the `hasName()`

r321628 - Again reverting an attempt to convert the DeclSpec enums into scoped enums.

2018-01-01 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jan 1 10:23:28 2018 New Revision: 321628 URL: http://llvm.org/viewvc/llvm-project?rev=321628=rev Log: Again reverting an attempt to convert the DeclSpec enums into scoped enums. - reverts r321622, r321625, and r321626. - the use of bit-fields is still resulting in

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

2018-01-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:62-63 +void UnusedReturnValueCheck::check(const MatchFinder::MatchResult ) { + if (const auto Matched = Result.Nodes.getNodeAs("match")) { +diag(Matched->getLocStart(), "unused

[PATCH] D40787: [clang-tidy] Replace the usage of std::uncaught_exception with std::uncaught_exceptions

2018-01-01 Thread Daniel Kolozsvari via Phabricator via cfe-commits
koldaniel updated this revision to Diff 128390. https://reviews.llvm.org/D40787 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/ModernizeTidyModule.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.cpp clang-tidy/modernize/UseUncaughtExceptionsCheck.h

r321609 - [Sema] Improve diagnostics for const- and ref-qualified member functions

2018-01-01 Thread Jacob Bandes-Storch via cfe-commits
Author: jtbandes Date: Sun Dec 31 10:27:29 2017 New Revision: 321609 URL: http://llvm.org/viewvc/llvm-project?rev=321609=rev Log: [Sema] Improve diagnostics for const- and ref-qualified member functions (Re-submission of D39937 with fixed tests.) Adjust wording for const-qualification mismatch

r321626 - [Sema] Fix build with GCC

2018-01-01 Thread Benjamin Kramer via cfe-commits
Author: d0k Date: Mon Jan 1 09:07:23 2018 New Revision: 321626 URL: http://llvm.org/viewvc/llvm-project?rev=321626=rev Log: [Sema] Fix build with GCC tools/clang/lib/Sema/DeclSpec.cpp: In member function 'void clang::DeclSpec::Finish(clang::Sema&, const clang::PrintingPolicy&)':

r321625 - Use 'unsigned int' instead of enum bit-fields to silence some warnings from r321622

2018-01-01 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jan 1 08:36:47 2018 New Revision: 321625 URL: http://llvm.org/viewvc/llvm-project?rev=321625=rev Log: Use 'unsigned int' instead of enum bit-fields to silence some warnings from r321622 - bots were complaining that the bit-field width was less than the width of the

r321623 - Fixed markup formatting

2018-01-01 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Mon Jan 1 07:53:16 2018 New Revision: 321623 URL: http://llvm.org/viewvc/llvm-project?rev=321623=rev Log: Fixed markup formatting Modified: cfe/trunk/docs/UsersManual.rst Modified: cfe/trunk/docs/UsersManual.rst URL:

r321622 - [NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums with underlying types.

2018-01-01 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jan 1 07:42:13 2018 New Revision: 321622 URL: http://llvm.org/viewvc/llvm-project?rev=321622=rev Log: [NFC] Modernize enums TypeSpecifierWidth, TypeSpecifierSign & TypeSpecifierType into scoped enums with underlying types. - Since these enums are used as bit-fields -

[PATCH] D40854: [clang-tidy] WIP implement cppcoreguidelines check for mixed integer arithmetic

2018-01-01 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Guidelines issue is here: https://github.com/isocpp/CppCoreGuidelines/issues/1120 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D40854 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r321621 - Enable configuration files in clang

2018-01-01 Thread Serge Pavlov via cfe-commits
Author: sepavloff Date: Mon Jan 1 05:27:01 2018 New Revision: 321621 URL: http://llvm.org/viewvc/llvm-project?rev=321621=rev Log: Enable configuration files in clang Clang is inherently a cross compiler and can generate code for any target enabled during build. It however requires to specify

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

2018-01-01 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I think it would be more user friendly if the configured list can be a list and the `|` concatenation is done within your code. Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:29 + llvm::raw_svector_ostream OS(InlinedName); + auto

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

2018-01-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/bugprone/UnusedReturnValueCheck.cpp:13 +#include "clang/ASTMatchers/ASTMatchFinder.h" + +using namespace clang::ast_matchers; Please include cassert, Regex.h, raw_ostream.h, SmallString.h.

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

2018-01-01 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/cppcoreguidelines/MacroUsageCheck.cpp:13 +#include "clang/Lex/PPCallbacks.h" + +namespace clang { Please include string and STLExtras.h. Comment at:

[PATCH] D41056: [clang-tidy] New check misc-uniqueptr-release-unused-retval

2018-01-01 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun abandoned this revision. khuttun added a comment. Closing this as more general check is being reviewed here: https://reviews.llvm.org/D41655 Repository: rL LLVM https://reviews.llvm.org/D41056 ___ cfe-commits mailing list

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

2018-01-01 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun created this revision. khuttun added reviewers: alexfh, aaron.ballman. khuttun added a project: clang-tools-extra. Herald added subscribers: xazax.hun, mgorny. Detects function calls where the return value is unused. Checked functions can be configured. https://reviews.llvm.org/D41655