https://github.com/RIscRIpt closed
https://github.com/llvm/llvm-project/pull/119986
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RIscRIpt wrote:
I reproduced the problem locally by adding `-m32` flag to `%clang_cl`. Changes
in this PR fix the test failure.
https://github.com/llvm/llvm-project/pull/119986
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
https://github.com/RIscRIpt created
https://github.com/llvm/llvm-project/pull/119986
Fix test failure from #119719
84b0f0145887bbfe49fd4dc85490b14108a72cee
Closes #119979
>From 876efed487603b450c56cd4c282449f5bfef52ad Mon Sep 17 00:00:00 2001
From: Richard Dzenis
Date: Sat, 14 Dec 2024 23:32:
RIscRIpt wrote:
> I'm seeing this on Linux: ...
Yes, the same problem. It should be fixed now.
https://github.com/llvm/llvm-project/pull/119873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
DzenIsRich wrote:
> I'm seeing this on Linux: ...
Yes, the same problem. It should be fixed now.
https://github.com/llvm/llvm-project/pull/119873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo
https://github.com/RIscRIpt closed
https://github.com/llvm/llvm-project/pull/119873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RIscRIpt approved this pull request.
LGTM, this fixes `clang/test/SemaCXX/msvc-pragma-function-no-builtin-attr.cpp`
on macOS.
https://github.com/llvm/llvm-project/pull/119873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
RIscRIpt wrote:
This should fix https://lab.llvm.org/buildbot/#/builders/190/builds/11300
I am compiling clang locally to verify that there would be no other problems
with the test on macOS.
> I suppose this is the reason check-clang fails today.
Are there other test failures related to
84b0
https://github.com/RIscRIpt approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/119153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RIscRIpt wrote:
> allow [[msvc::constexpr]] usage outside the std namespace
By the way, to be precisely correct, these changes actually allow usage of
"placement new" in `[[msvc::constexpr]]` context outside of the std namespace.
https://github.com/llvm/llvm-project/pull/119153
_
https://github.com/RIscRIpt edited
https://github.com/llvm/llvm-project/pull/119153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RIscRIpt wrote:
I don't think so.
Ah, I forgot I previously added `clang/test/AST/ms-constexpr.cpp`, so having
your new `ms-constexpr-new.cpp` makes sense (sorry for confusion).
But I still would like to see a test in
`clang/test/SemaCXX/ms-constexpr-new.cpp
https://github.com/RIscRIpt requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/119153
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RIscRIpt wrote:
Instead of adding this new test, could you please modify behavior of existing
test:
[`clang/test/SemaCXX/ms-constexpr-new.cpp`](https://github.com/llvm/llvm-project/pull/71300/files#diff-b0e33c7c54dd10b988b2badcc60be091e69ff3aeaf86c95cb2bb9bec1
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33
-std=c++20 -verify=supported %s
RIscRIpt wrote:
Opened #74932.
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits m
https://github.com/RIscRIpt created
https://github.com/llvm/llvm-project/pull/74932
Fixes regression introduced in b3e6ff331925dde24a4707452d657da0fdf7f588
.---command stderr
| error: 'supported-warning' diagnostics seen but not expected:
| File
C:\buildbot\as-builder
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33
-std=c++20 -verify=supported %s
RIscRIpt wrote:
We can just remove `__cdecl` altogether. I put it there to replicate
Microsoft's STL. MSVC accepts that test case without `_
RIscRIpt wrote:
Suggested commit message:
```
Add support for 'msvc::constexpr' C++11 attribute
This commit adds support for MSVC-specific C++11-style attribute
`[[msvc::constexpr]]`, which was added in MSVC 14.33.
The semantics of this attribute is enabled only under MSVC compatibility
(`-fms-c
RIscRIpt wrote:
I don't have write access, but I believe it is ready to be merged.
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RIscRIpt wrote:
Thank you!
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -3657,6 +3657,21 @@ an error:
}];
}
+def MSConstexprDocs : Documentation {
+ let Category = DocCatStmt;
+ let Content = [{
+The ``[[msvc::constexpr]]`` attribute can be applied only to a function
+definition or a ``return`` statement. It does not impact function declarati
@@ -5546,11 +5563,14 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result,
EvalInfo &Info,
case Stmt::LabelStmtClass:
return EvaluateStmt(Result, Info, cast(S)->getSubStmt(), Case);
- case Stmt::AttributedStmtClass:
-// As a general principle, C++11 attributes
@@ -235,6 +235,7 @@ Non-comprehensive list of changes in this release
except that it returns the size of a type ignoring tail padding.
* ``__builtin_classify_type()`` now classifies ``_BitInt`` values as the
return value ``18``
and vector types as return value ``19``, to m
RIscRIpt wrote:
> Also, please don't 'force-push', just push an additional commit to your
> review. It erases history and makes reviewing it about 3x harder since
> history/context gets lost.
Sorry. I did this, because I am used to such workflow and reviewing
[range-diff](https://github.com/l
https://github.com/RIscRIpt updated
https://github.com/llvm/llvm-project/pull/71300
>From 3be36c6100801195f8f1f5167bdaa289bc8cb175 Mon Sep 17 00:00:00 2001
From: Richard Dzenis
Date: Thu, 20 Jul 2023 00:18:50 +0300
Subject: [PATCH 1/4] [clang-cl] Add support for [[msvc::constexpr]] C++11
attri
https://github.com/RIscRIpt updated
https://github.com/llvm/llvm-project/pull/71300
>From 3be36c6100801195f8f1f5167bdaa289bc8cb175 Mon Sep 17 00:00:00 2001
From: Richard Dzenis
Date: Thu, 20 Jul 2023 00:18:50 +0300
Subject: [PATCH 1/2] [clang-cl] Add support for [[msvc::constexpr]] C++11
attri
https://github.com/RIscRIpt edited
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2861,8 +2861,8 @@ def warn_cxx17_compat_constexpr_local_var_no_init :
Warning<
"is incompatible with C++ standards before C++20">,
InGroup, DefaultIgnore;
def ext_constexpr_function_never_constant_expr : ExtWarn<
- "%select{constexpr|consteval}1 %select{function|const
@@ -3612,6 +3612,22 @@ an error:
}];
}
+def MSConstexprDocs : Documentation {
+ let Category = DocCatStmt;
+ let Content = [{
+The ``[[msvc::constexpr]]`` attribute can be applied only to a function
+definition or a ``return`` statement. It does not impact function declarati
@@ -217,6 +217,8 @@ C23 Feature Support
Non-comprehensive list of changes in this release
-
+- The default value of `_MSC_VER` was raised from 1920 to 1933.
+ MSVC 19.33 added undocumented attribute ``[[msvc::constexpr]]``.
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
@@ -2884,6 +2884,12 @@ def warn_cxx11_compat_constexpr_body_multiple_return :
Warning<
InGroup, DefaultIgnore;
def note_constexpr_body_previous_return : Note<
"previous return statement is here">;
+def err_ms_constexpr_not_distinct : Error<
+ "[[msvc::constexpr]] cannot b
https://github.com/RIscRIpt edited
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/RIscRIpt commented:
Addressed review comments; updated my tests to use changed diagnostic messages.
Next I'll upload my branch rebased onto main.
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commi
https://github.com/RIscRIpt updated
https://github.com/llvm/llvm-project/pull/71300
>From d2b4e14210d7ac24e4a48407e8dc7dac9d97a549 Mon Sep 17 00:00:00 2001
From: Richard Dzenis
Date: Thu, 20 Jul 2023 00:18:50 +0300
Subject: [PATCH 1/2] [clang-cl] Add support for [[msvc::constexpr]] C++11
attri
RIscRIpt wrote:
Rebased onto main, resolved conflicts, re-run lit locally.
Please let me know if I could speed-up review in any way.
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
https://github.com/RIscRIpt updated
https://github.com/llvm/llvm-project/pull/71300
>From 65c306e94e9b749ef0d38ef709ddb8b23dac987a Mon Sep 17 00:00:00 2001
From: Richard Dzenis
Date: Thu, 20 Jul 2023 00:18:50 +0300
Subject: [PATCH 1/2] [clang-cl] Add support for [[msvc::constexpr]] C++11
attri
RIscRIpt wrote:
Oof, sorry, I forgot I should push new changes and rebased changes separately
(otherwise "Compare" link does not make sense). If you had checkout
`829f8098af96` locally, you can see the diff diff as follows:
```
git range-diff 829f8098af96~2..829f8098af96 7d8b1c0fae42~2..7d8b1c
https://github.com/RIscRIpt updated
https://github.com/llvm/llvm-project/pull/71300
>From 93be428cb8af34292305741a891ddffe362e9a20 Mon Sep 17 00:00:00 2001
From: Richard Dzenis
Date: Thu, 20 Jul 2023 00:18:50 +0300
Subject: [PATCH 1/2] [clang-cl] Add support for [[msvc::constexpr]] C++11
attri
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33
-std=c++20 -verify %s
+// expected-no-diagnostics
+
+[[msvc::constexpr]] int log2(int x) { [[msvc::constexpr]] return x > 1 ? 1 +
log2(x / 2) : 0; }
+constexpr bool test_log2() { [[msvc::con
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33
-std=c++20 -verify %s
+// expected-no-diagnostics
+
+[[msvc::constexpr]] int log2(int x) { [[msvc::constexpr]] return x > 1 ? 1 +
log2(x / 2) : 0; }
+constexpr bool test_log2() { [[msvc::con
@@ -7337,6 +7337,27 @@ static void handleDeclspecThreadAttr(Sema &S, Decl *D,
const ParsedAttr &AL) {
D->addAttr(::new (S.Context) ThreadAttr(S.Context, AL));
}
+static void handleMSConstexprAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+ if (!S.getLangOpts().isCompatible
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -fms-compatibility -fms-compatibility-version=19.33
-std=c++20 -verify %s
+// expected-no-diagnostics
+
+[[msvc::constexpr]] int log2(int x) { [[msvc::constexpr]] return x > 1 ? 1 +
log2(x / 2) : 0; }
+constexpr bool test_log2() { [[msvc::con
https://github.com/RIscRIpt edited
https://github.com/llvm/llvm-project/pull/71300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
RIscRIpt wrote:
Discussion initiated by @AaronBallman of one of important design decisions,
which was forgotten (?):
> @AaronBallman:
> It's a good question as to whether we want to support that only when passing
> `-fms-extensions` or not (it seems like a generally useful attribute); we
> do
RIscRIpt wrote:
Initially I replicated semantics of `[[msvc::constexpr]]` from MSVC, so that it
was possible to use it the same way as in MSVC, even `[[msvc::constexpr]]
return ::new` from non-std namespace. E.g. https://godbolt.org/z/7eKh5Envz
```cpp
// RUN: %clang_cc1 -fms-compatibility -fms-
https://github.com/RIscRIpt created
https://github.com/llvm/llvm-project/pull/71300
As per agreement with @AaronBallman and @erichkeane, I am re-opening this patch
here.
The current version of the patch has undergone numerous revisions before it
became the version I am sending to GitHub.
Bel
50 matches
Mail list logo