[PATCH] D24933: Enable configuration files in clang

2016-12-12 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 81057. sepavloff added a comment. Fixed grammar in comment, thanks to Hal Finkel. https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/clang/Driver/Dri

[PATCH] D24933: Enable configuration files in clang

2016-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 81227. sepavloff added a comment. Addressed review notes. https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/clang/Driver/Driver.h lib/Driver/Drive

[PATCH] D24933: Enable configuration files in clang

2016-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: include/clang/Driver/Driver.h:287 + const std::string &getConfigFile() const { return ConfigFile; } + void setConfigFile(StringRef x, unsigned N) { +ConfigFile = x; bruno wrote: > x -> FileName Fixed. =

[PATCH] D23096: [Sema] Pass CombineWithOuterScope = true to constructor of LocalInstantiationScope

2016-12-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. Looks good. Thank you! https://reviews.llvm.org/D23096 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bi

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. Herald added subscribers: krytarowski, javed.absar, nhaehnle, rengolin, aemerson. Now if clang driver is given wrong arguments, in some cases it continues execution and returns zero code. This change fixes this behavior. The fix revealed some errors in clang test

[PATCH] D24933: Enable configuration files in clang

2017-05-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 98330. sepavloff added a comment. Herald added subscribers: krytarowski, rengolin. Updated patch https://reviews.llvm.org/D24933 Files: docs/UsersManual.rst include/clang/Basic/DiagnosticDriverKinds.td include/clang/Config/config.h.cmake include/c

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 98395. sepavloff added a comment. Addressed reviewer's notes. https://reviews.llvm.org/D33013 Files: lib/Driver/Driver.cpp test/Driver/aarch64-cpus.c test/Driver/amdgpu-features.c test/Driver/arm-darwin-builtin.c test/Driver/arm-default-build-at

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-11 Thread Serge Pavlov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL302775: Driver must return non-zero code on errors in command line (authored by sepavloff). Changed prior to commit: https://reviews.llvm.org/D33013?vs=98395&id=98592#toc Repository: rL LLVM https:/

[PATCH] D33173: Modify test to look for patterns in stderr as well

2017-05-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. With the change https://reviews.llvm.org/D33013 driver does not build compilation object if command line is invalid, in particular, if unrecognized option is provided. In such cases it prints diagnostics on stderr. The test 'clang-tidy/diagnostic.cpp' checks reacti

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-14 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 98930. sepavloff added a comment. Herald added a subscriber: klimek. Added missed case The patch missed a case when Compilation object is created during work of clang based tool, it resulted in fail of the test 'clang-tidy/diagnostic.cpp'. This addition to

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. Now FixedCompilationDatabase::loadFromCommandLine has no means to report which error occurred if it fails to create compilation object. This is a block for implementing https://reviews.llvm.org/D33013, because after that change driver refuses to create compilation

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: lib/Tooling/CompilationDatabase.cpp:208 IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions(); - UnusedInputDiagConsumer DiagClient; + TextDiagnosticPrinter DiagnosticPrinter(llvm::errs(), &*DiagOpts); + UnusedInputDiagConsumer D

[PATCH] D33013: Driver must return non-zero code on errors in command line

2017-05-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99273. sepavloff added a comment. Moved tooling related code into separate change https://reviews.llvm.org/D33272 https://reviews.llvm.org/D33013 Files: include/clang/Tooling/CompilationDatabase.h lib/Driver/Driver.cpp lib/Frontend/CreateInvocationF

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In https://reviews.llvm.org/D33272#758616, @joerg wrote: > Can this use ErrorOr? It makes sense if constructing methods of `CompilationDatabase` were also changed to return `ErrorOr`, as there is no need to have different interfaces for the similar functionality. On

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-19 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99600. sepavloff added a comment. Change loadFromCommandLine so that it returns std::unique_ptr as methods of CompilationDatabase does https://reviews.llvm.org/D33272 Files: include/clang/Tooling/CompilationDatabase.h lib/Frontend/CreateInvocationFro

[PATCH] D30170: Function definition may have uninstantiated body

2017-05-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99698. sepavloff added a comment. Made the patch a bit more compact. NFC. https://reviews.llvm.org/D30170 Files: include/clang/AST/Decl.h lib/AST/Decl.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/cxx0x-cursory-default-delete.cpp test/SemaCXX/friend2.c

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99786. sepavloff marked an inline comment as done. sepavloff added a comment. Addressed reviewer's notes. https://reviews.llvm.org/D33272 Files: include/clang/Tooling/CompilationDatabase.h lib/Frontend/CreateInvocationFromCommandLine.cpp lib/Tooling

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you! I put updated fix here. If it is OK, I'll commit it tomorrow. Comment at: lib/Tooling/CompilationDatabase.cpp:292 + if (Argc == 0) { +ErrorMsg = "error: no arguments specified\n"; +return nullptr; alexfh wrote: >

[PATCH] D21508: Make friend function template definition available if class is instantiated.

2017-05-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff marked an inline comment as done. sepavloff added inline comments. Comment at: lib/AST/DeclTemplate.cpp:292-311 +FunctionTemplateDecl *FunctionTemplateDecl::getDefinition() const { + for (auto *R : redecls()) { +FunctionTemplateDecl *F = cast(R); +if (F->isThis

[PATCH] D21508: Make friend function template definition available if class is instantiated.

2017-05-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99789. sepavloff edited the summary of this revision. sepavloff added a comment. Updated patch https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclTemplate.h lib/AST/Decl.cpp lib/AST/DeclTemplate.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaT

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. I see your reasons. Updated the patch accordingly. Thank you! https://reviews.llvm.org/D33272 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D33272: Method loadFromCommandLine should be able to report errors

2017-05-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 99919. sepavloff added a comment. Updated patch https://reviews.llvm.org/D33272 Files: include/clang/Tooling/CompilationDatabase.h lib/Frontend/CreateInvocationFromCommandLine.cpp lib/Tooling/CommonOptionsParser.cpp lib/Tooling/CompilationDatabase

[PATCH] D112932: [WIP] Use llvm.is_fpclass to implement FP classification functions

2022-02-21 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 410303. sepavloff added a comment. Updated patch because the base revision is updated Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112932/new/ https://reviews.llvm.org/D112932 Files: clang/include/clang/B

[PATCH] D101425: Make LValuePathEntry a discriminated union

2021-04-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added reviewers: rsmith, rjmccall, varungandhi-apple, Tyker, EricWF, george.burgess.iv, nand. Herald added a subscriber: martong. Herald added a reviewer: shafik. sepavloff requested review of this revision. Herald added a project: clang. APValue::LValue

[PATCH] D101429: PR45879: Use LValue object to evaluate active union members

2021-04-28 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff created this revision. sepavloff added a reviewer: rsmith. sepavloff requested review of this revision. Herald added a project: clang. The function HandleUnionActiveMemberChange determined union members that become active by analyzing LHS expression. It works for assignment operator but

[PATCH] D115604: [Support] Expand `` as the base directory in configuration files.

2021-12-30 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff accepted this revision. sepavloff added a comment. This revision is now accepted and ready to land. LGTM Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115604/new/ https://reviews.llvm.org/D115604

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2022-01-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. P1330R0 (https://wg21.link/P1330R0) allowed changing the active member of a union in constexpr expressions. To implement it the Constant Evaluator starting from https://github.com/llvm/llvm-project/commit/31c69a3d6363463c08b86914c0c8cfc5c929c37e checks if an assignmen

[PATCH] D115804: [CodeGen] use saturating FP casts when compiling with "no-strict-float-cast-overflow"

2021-12-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D115804#3201681 , @spatel wrote: > In D115804#3201044 , @craig.topper > wrote: > >> What's the plan for constrained intrinsics versions of these intrinsics? The >> IRBuilder calls f

[PATCH] D115604: [Support] Expand `<@>` as the base directory in response files.

2021-12-22 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: clang/docs/UsersManual.rst:920 +To generate paths relative to the configuration file, the `<@>` token may be +used. This will expand to the absolute path of the directory containing the Response and configuration fil

[PATCH] D115604: [Support] Expand `<@>` as the base directory in response files.

2021-12-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for the detailed explanation. Now I see how you are going to use this facility and think it worth implementation. A couple of questions. 1. It it possible to limit the new syntax to config files only? It would avoid concerns of gcc compatibility. 2. The new

[PATCH] D115604: [Support] Expand `` as the base directory in response files.

2021-12-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. The name of the patch could be more precise if you change `response files` to `configuration files`. Comment at: clang/docs/UsersManual.rst:926-927 + +A potential `` use-case may be search paths in a portable (i.e. not +installed) SDK directory for e

[PATCH] D115604: [Support] Expand `` as the base directory in configuration files.

2021-12-29 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added inline comments. Comment at: llvm/lib/Support/CommandLine.cpp:1099 +else + llvm::sys::path::append(ResponseFile, LHS); +ResponseFile.append(BasePath); What happens if `` is used without trailing path? Such line: ``` --sysroot= -ab

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-20 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D104854#2957423 , @spatel wrote: > Is it intentional that we are not canonicalizing the intrinsic call back to > `fcmp uno` in the default FP environment? It is lowered to unordered comparison by default. Changing `llvm.isn

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-23 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. I posted the RFC: https://lists.llvm.org/pipermail/llvm-dev/2021-August/152257.html Depending on the feedback I'll revert the check or modify the implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/

[PATCH] D106804: [test-suite] Add tests for FP classification intrinsics

2021-08-25 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 368687. sepavloff added a comment. Updated patch - Moved tests into header files. It should facilitate writing tests for various modes (strict exceptions, fast math etc), - Added Makefile, - Enhanced diagnostics if test fails, - Avoid C++, it makes easier

[PATCH] D106804: [test-suite] Add tests for FP classification intrinsics

2021-09-09 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D106804#2956881 , @RKSimon wrote: > Something I noticed is that we don't have much test coverage in > clang/test/codegen for the fpclass intrinsics - including no constexpr > testing afaict (although I don't think __builtin

[PATCH] D106804: [test-suite] Add tests for FP classification intrinsics

2021-09-10 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. In D106804#2991411 , @RKSimon wrote: > Do we have test-suite buildbot coverage on anything other than x86? Cross > platform uses of long double is always fun The following build bots have a stage named `test-suite`: c

<    2   3   4   5   6   7