[Lldb-commits] [lldb] d093111 - [LLDB] Remove XFAIL on Windows decorator XPASSes

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-29T12:13:16+04:00
New Revision: d093111ab135154cabc77e5bad625d9d7cd720d5

URL: 
https://github.com/llvm/llvm-project/commit/d093111ab135154cabc77e5bad625d9d7cd720d5
DIFF: 
https://github.com/llvm/llvm-project/commit/d093111ab135154cabc77e5bad625d9d7cd720d5.diff

LOG: [LLDB] Remove XFAIL on Windows decorator XPASSes

Following tests are now passing on LLDB AArch64 Windows buildbot:
  lldb-api :: 
commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
  lldb-api :: 
functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
  lldb-api :: lang/cpp/constructors/TestCppConstructors.py
  lldb-api :: lang/cpp/namespace/TestNamespace.py
  lldb-api :: lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py

https://lab.llvm.org/buildbot/#/builders/219/builds/3012

This patch removes XFAIL decorator from all of the above.

Differential Revision: https://reviews.llvm.org/D151268

Added: 


Modified: 

lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py

lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
 
b/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
index c69b4e5b32ef5..ce74dd27cc179 100644
--- 
a/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
+++ 
b/lldb/test/API/commands/expression/deleting-implicit-copy-constructor/TestDeletingImplicitCopyConstructor.py
@@ -6,6 +6,5 @@
 globals(),
 [
 decorators.expectedFailureAll(bugnumber="llvm.org/pr50814", 
compiler="gcc"),
-decorators.expectedFailureAll(oslist=["windows"]),
 ],
 )

diff  --git 
a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
 
b/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
index 47840102cf3cc..f602d017f28b7 100644
--- 
a/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
+++ 
b/lldb/test/API/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
@@ -16,7 +16,6 @@ def setUp(self):
 self.line = line_number("main.cpp", "// Set break point at this line.")
 
 @expectedFlakeyNetBSD
-@expectedFailureAll(oslist=["windows"])
 def test_with_run_command(self):
 """Test that that file and class static variables display correctly."""
 self.build()

diff  --git a/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py 
b/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
index 0c3de3aaf1a55..4c50de0cd7502 100644
--- a/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
+++ b/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
@@ -6,7 +6,6 @@
 
 class TestCase(TestBase):
 @expectedFailureAll(bugnumber="llvm.org/pr50814", compiler="gcc")
-@expectedFailureAll(oslist=["windows"])
 def test_constructors(self):
 self.build()
 lldbutil.run_to_source_breakpoint(

diff  --git a/lldb/test/API/lang/cpp/namespace/TestNamespace.py 
b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
index 1301342599df1..1dc9d00fcd993 100644
--- a/lldb/test/API/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
@@ -11,7 +11,6 @@
 
 class NamespaceBreakpointTestCase(TestBase):
 @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
-@expectedFailureAll(oslist=["windows"])
 def test_breakpoints_func_auto(self):
 """Test that we can set breakpoints correctly by basename to find all 
functions whose basename is "func"."""
 self.build()

diff  --git 
a/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py 
b/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
index a307d091ed0d7..2321246a2e7e5 100644
--- a/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
+++ b/lldb/test/API/lang/cpp/this_class_type_mixing/TestThisClassTypeMixing.py
@@ -16,7 +16,6 @@ class by injecting a "$__lldb_expr" member function into the 
class. This
 
 class TestCase(TestBase):
 @no_debug_info_test
-@expectedFailureAll(oslist=["windows"])
 def test(self):
 self.build()
 lldbutil.run_to_source_breakpoint(



___
lldb-commits mailing list
lldb-comm

[Lldb-commits] [lldb] f2a8661 - [LLDB] Fix TestVarPath.py for AArch64 Windows

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-29T16:17:13+04:00
New Revision: f2a866170c4961137608eee1c26f6eaa1e8e62a1

URL: 
https://github.com/llvm/llvm-project/commit/f2a866170c4961137608eee1c26f6eaa1e8e62a1
DIFF: 
https://github.com/llvm/llvm-project/commit/f2a866170c4961137608eee1c26f6eaa1e8e62a1.diff

LOG: [LLDB] Fix TestVarPath.py for AArch64 Windows

Since 44bb442 LLDB TestVarPath.py crashes on AArch64 Windows.
GetValueForVariablePath function seems to be triggering the crash.
This patch disable parts of this test causing the crash.

Bug reported upstream:
https://github.com/llvm/llvm-project/issues/62983

Added: 


Modified: 
lldb/test/API/functionalities/var_path/TestVarPath.py

Removed: 




diff  --git a/lldb/test/API/functionalities/var_path/TestVarPath.py 
b/lldb/test/API/functionalities/var_path/TestVarPath.py
index 06b4a2d8da313..f79b2a7584ae9 100644
--- a/lldb/test/API/functionalities/var_path/TestVarPath.py
+++ b/lldb/test/API/functionalities/var_path/TestVarPath.py
@@ -5,6 +5,7 @@
 
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 
 
@@ -115,7 +116,7 @@ def do_test(self):
 self.assertSuccess(v.GetError(), "Make sure we find 'pt_sp'")
 # Make sure we don't crash when looking for non existant child
 # in type with synthetic children. This used to cause a crash.
-v = frame.GetValueForVariablePath("pt_sp->not_valid_child")
-self.assertTrue(
-v.GetError().Fail(), "Make sure we don't find 
'pt_sp->not_valid_child'"
-)
+if not self.isAArch64Windows():
+v = frame.GetValueForVariablePath("pt_sp->not_valid_child")
+self.assertTrue(v.GetError().Fail(),
+"Make sure we don't find 'pt_sp->not_valid_child'")



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] ab05d91 - Revert "[LLDB] Add/Remove xfail for some API tests on Windows"

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: tcwg
Date: 2023-05-29T17:39:36+04:00
New Revision: ab05d9134d18db34501985a01fbfc02609767587

URL: 
https://github.com/llvm/llvm-project/commit/ab05d9134d18db34501985a01fbfc02609767587
DIFF: 
https://github.com/llvm/llvm-project/commit/ab05d9134d18db34501985a01fbfc02609767587.diff

LOG: Revert "[LLDB] Add/Remove xfail for some API tests on Windows"

This reverts commit 6ea1a0d4fc3823de143a288df2059b48dc01cf72.

It again marks XFAIL LLDB tests failing after
c384fcd3ea1dad782eaaea89b32fc33c0c3528b8

Added: 


Modified: 
lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py

lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
lldb/test/API/lang/c/step-target/TestStepTarget.py
lldb/test/API/lang/cpp/global_variables/TestCPPGlobalVariables.py
lldb/test/API/lang/cpp/namespace/TestNamespace.py
lldb/test/API/lang/cpp/static_members/TestCPPStaticMembers.py
lldb/test/API/python_api/function_symbol/TestDisasmAPI.py
lldb/test/API/python_api/function_symbol/TestSymbolAPI.py
lldb/test/API/python_api/symbol-context/TestSymbolContext.py
lldb/test/API/python_api/target/TestTargetAPI.py
lldb/test/API/python_api/value/TestValueAPI.py

Removed: 




diff  --git 
a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py 
b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
index 48377a75d23bb..438b92cdc4846 100644
--- a/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
+++ b/lldb/test/API/commands/expression/save_jit_objects/TestSaveJITObjects.py
@@ -22,6 +22,7 @@ def cleanJITFiles(self):
 os.remove(j)
 return
 
+@expectedFailureAll(oslist=["windows"])
 def test_save_jit_objects(self):
 self.build()
 os.chdir(self.getBuildDir())

diff  --git 
a/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
 
b/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
index 745700a14a3f0..9f477f951cd86 100644
--- 
a/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
+++ 
b/lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
@@ -12,17 +12,20 @@
 class TestScriptedResolver(TestBase):
 NO_DEBUG_INFO_TESTCASE = True
 
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_scripted_resolver(self):
 """Use a scripted resolver to set a by symbol name breakpoint"""
 self.build()
 self.do_test()
 
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_search_depths(self):
 """Make sure we are called at the right depths depending on what we 
return
 from __get_depth__"""
 self.build()
 self.do_test_depths()
 
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
 def test_command_line(self):
 """Test setting a resolver breakpoint from the command line"""
 self.build()

diff  --git 
a/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py 
b/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
index ae4847bb788fe..49a72c2863e74 100644
--- a/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
+++ b/lldb/test/API/functionalities/inline-stepping/TestInlineStepping.py
@@ -25,7 +25,8 @@ def test_step_over_with_python_api(self):
 self.build()
 self.inline_stepping_step_over()
 
-@add_test_categories(["pyapi"])
+@add_test_categories(['pyapi'])
+@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
 def test_step_in_template_with_python_api(self):
 """Test stepping in to templated functions."""
 self.build()

diff  --git 
a/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py 
b/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
index 1d4a0008f6b44..6c399b8a0a1b2 100644
--- a/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/lldb/test/API/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -10,7 +10,9 @@
 
 
 class StepAvoidsNoDebugTestCase(TestBase):
-@add_test_categories(["pyapi"])
+
+@add_test_categories(['pyapi'])
+@expectedFailureAll(archs=["aarch64"], oslist=["windows"], 
bugnumber="llvm.org/pr56292")
 def test_step_out_with_python(self):
 """Test stepping out using avoid-no-debug with dsyms."""
 self.build()
@@ -24,8 +26,8 @@ def test_step_out_with_python(self):
 compiler_version=[">=", "3.9"],
 archs=["i386"],
 oslist=no_match(["freebsd"]),
-bugnumber="llvm.org/pr28549",
-)
+bugnumber="llvm.org/pr28549")

[Lldb-commits] [lldb] 7fb60b0 - [LLDB] Add XFAIL on AArch64/Windows to TestNamespace.py

2023-05-29 Thread Muhammad Omair Javaid via lldb-commits

Author: Muhammad Omair Javaid
Date: 2023-05-29T18:53:42+04:00
New Revision: 7fb60b0123e50389afbde0286a0e59923d154210

URL: 
https://github.com/llvm/llvm-project/commit/7fb60b0123e50389afbde0286a0e59923d154210
DIFF: 
https://github.com/llvm/llvm-project/commit/7fb60b0123e50389afbde0286a0e59923d154210.diff

LOG: [LLDB] Add XFAIL on AArch64/Windows to TestNamespace.py

Added: 


Modified: 
lldb/test/API/lang/cpp/namespace/TestNamespace.py

Removed: 




diff  --git a/lldb/test/API/lang/cpp/namespace/TestNamespace.py 
b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
index 960cdac06dea..1dc9d00fcd99 100644
--- a/lldb/test/API/lang/cpp/namespace/TestNamespace.py
+++ b/lldb/test/API/lang/cpp/namespace/TestNamespace.py
@@ -37,6 +37,7 @@ def test_breakpoints_func_auto(self):
 )
 
 @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
+@expectedFailureAll(oslist=["windows"])
 def test_breakpoints_func_full(self):
 """Test that we can set breakpoints correctly by fullname to find all 
functions whose fully qualified name is "func"
 (no namespaces)."""



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [lldb] cd21c0d - Revert "Revert "Host: generalise `GetXcodeSDKPath`""

2023-05-29 Thread Saleem Abdulrasool via lldb-commits

Author: Saleem Abdulrasool
Date: 2023-05-29T10:16:41-07:00
New Revision: cd21c0d30c0803b24e1dcf71d2f04cb46e539905

URL: 
https://github.com/llvm/llvm-project/commit/cd21c0d30c0803b24e1dcf71d2f04cb46e539905
DIFF: 
https://github.com/llvm/llvm-project/commit/cd21c0d30c0803b24e1dcf71d2f04cb46e539905.diff

LOG: Revert "Revert "Host: generalise `GetXcodeSDKPath`""

This reverts commit c46d9af26cefb0b24646d3235b75ae7a1b8548d4.

Rename the variable to avoid `-Wchanges-meaning` warning.  Although, it
might be better to squelch the warning as it is of low value IMO.

Added: 


Modified: 
lldb/include/lldb/Host/HostInfoBase.h
lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
lldb/source/Core/Module.cpp
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
lldb/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
lldb/unittests/Host/HostInfoTest.cpp

Removed: 




diff  --git a/lldb/include/lldb/Host/HostInfoBase.h 
b/lldb/include/lldb/Host/HostInfoBase.h
index 6c86c71e552dc..4082cd7f62bc6 100644
--- a/lldb/include/lldb/Host/HostInfoBase.h
+++ b/lldb/include/lldb/Host/HostInfoBase.h
@@ -31,6 +31,23 @@ struct SharedCacheImageInfo {
   lldb::DataBufferSP data_sp;
 };
 
+namespace {
+struct HostInfoError : public llvm::ErrorInfo {
+  static char ID;
+  const std::string message_;
+
+  HostInfoError(const std::string message) : message_(std::move(message)) {}
+
+  void log(llvm::raw_ostream &OS) const override { OS << "HostInfoError"; }
+
+  std::error_code convertToErrorCode() const override {
+return llvm::inconvertibleErrorCode();
+  }
+};
+
+char HostInfoError::ID = 0;
+} // namespace
+
 class HostInfoBase {
 private:
   // Static class, unconstructable.
@@ -108,10 +125,14 @@ class HostInfoBase {
 
   static FileSpec GetXcodeContentsDirectory() { return {}; }
   static FileSpec GetXcodeDeveloperDirectory() { return {}; }
-  
-  /// Return the directory containing a specific Xcode SDK.
-  static llvm::Expected GetXcodeSDKPath(XcodeSDK sdk) {
-return "";
+
+  struct SDKOptions {
+std::optional XcodeSDKSelection;
+  };
+
+  /// Return the directory containing something like a SDK (reused for Swift).
+  static llvm::Expected GetSDKRoot(SDKOptions options) {
+return llvm::make_error("cannot determine SDK root");
   }
 
   /// Return information about module \p image_name if it is loaded in

diff  --git a/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h 
b/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
index 0402509cfa261..74d979d965a73 100644
--- a/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
+++ b/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
@@ -31,7 +31,7 @@ class HostInfoMacOSX : public HostInfoPosix {
   static FileSpec GetXcodeDeveloperDirectory();
 
   /// Query xcrun to find an Xcode SDK directory.
-  static llvm::Expected GetXcodeSDKPath(XcodeSDK sdk);
+  static llvm::Expected GetSDKRoot(SDKOptions options);
 
   /// Shared cache utilities
   static SharedCacheImageInfo

diff  --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index d527bdc76309d..a4ba09ef56418 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1607,8 +1607,8 @@ std::optional 
Module::RemapSourceFile(llvm::StringRef path) const {
 
 void Module::RegisterXcodeSDK(llvm::StringRef sdk_name,
   llvm::StringRef sysroot) {
-  XcodeSDK sdk(sdk_name.str());
-  auto sdk_path_or_err = HostInfo::GetXcodeSDKPath(sdk);
+  auto sdk_path_or_err =
+  HostInfo::GetSDKRoot(HostInfo::SDKOptions{sdk_name.str()});
 
   if (!sdk_path_or_err) {
 Debugger::ReportError("Error while searching for Xcode SDK: " +

diff  --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm 
b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index 5a39ed370747a..0b4fc1885cae9 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -338,7 +338,8 @@ static void ParseOSVersion(llvm::VersionTuple &version, 
NSString *Key) {
   }
 }
 
-auto sdk_path_or_err = HostInfo::GetXcodeSDKPath(XcodeSDK::GetAnyMacOS());
+auto sdk_path_or_err =
+HostInfo::GetSDKRoot(SDKOptions{XcodeSDK::GetAnyMacOS()});
 if (!sdk_path_or_err) {
   Log *log = GetLog(LLDBLog::Host);
   LLDB_LOGF(log, "Error while searching for Xcode SDK: %s",
@@ -519,7 +520,7 @@ static void ParseOSVersion(llvm::VersionTuple &version, 
NSString *Key) {
   return path;
 }
 
-llvm::Expected HostInfoMacOSX::GetXcodeSDKPath(XcodeSDK sdk) {
+llvm::Expected HostInfoMacOSX::GetSDKRoot(SDKOptions options) 
{
   struct ErrorOrPath {
 std::string str;
 bool is_error;
@@ -530,6 +531,11 @@ static void ParseOSVersion(llvm::VersionTuple &version, 
NSString *Key) {
   std::lock_guard guard(g_sdk_path_mutex);
   LLDB_SCOPED_TIMER();
 
+  if (!options.XcodeSDKSelection)
+return llvm::crea

[Lldb-commits] [PATCH] D151668: Wrong link target in the documentation #62990

2023-05-29 Thread Eddie Phillips via Phabricator via lldb-commits
eddiep24 created this revision.
Herald added a project: All.
eddiep24 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

In the LDDB documentation you have the following sentence:

"The --format (which you can shorten to -f) option accepts a format name."

The link points to the wrong place.

I pointed it to the table that precedes the Type summary section.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151668

Files:
  lldb/docs/use/variable.rst


Index: lldb/docs/use/variable.rst
===
--- lldb/docs/use/variable.rst
+++ lldb/docs/use/variable.rst
@@ -132,8 +132,8 @@
 
 at the LLDB command line.
 
-The ``--format`` (which you can shorten to -f) option accepts a :doc:`format
-name`. Then, you provide one or more types to which you want the
+The ``--format`` (which you can shorten to -f) option accepts a `format
+name`_. Then, you provide one or more types to which you want the
 new format applied.
 
 A frequent scenario is that your program has a typedef for a numeric type that
@@ -249,6 +249,8 @@
 Finally, this is a list of formatting options available out of which you can
 pick:
 
+.. _`format name`:
+
 
+---+--+--+
 | **Format name**   | **Abbreviation** | 
**Description**  |
 
+---+--+--+


Index: lldb/docs/use/variable.rst
===
--- lldb/docs/use/variable.rst
+++ lldb/docs/use/variable.rst
@@ -132,8 +132,8 @@
 
 at the LLDB command line.
 
-The ``--format`` (which you can shorten to -f) option accepts a :doc:`format
-name`. Then, you provide one or more types to which you want the
+The ``--format`` (which you can shorten to -f) option accepts a `format
+name`_. Then, you provide one or more types to which you want the
 new format applied.
 
 A frequent scenario is that your program has a typedef for a numeric type that
@@ -249,6 +249,8 @@
 Finally, this is a list of formatting options available out of which you can
 pick:
 
+.. _`format name`:
+
 +---+--+--+
 | **Format name**   | **Abbreviation** | **Description**  |
 +---+--+--+
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

2023-05-29 Thread Nikolas Klauser via Phabricator via lldb-commits
philnik created this revision.
philnik added reviewers: aaron.ballman, erichkeane.
Herald added subscribers: wlei, wenlei, jdoerfert, dmgreen.
Herald added a project: All.
philnik requested review of this revision.
Herald added subscribers: lldb-commits, cfe-commits, jplehr, sstefan1, MaskRay.
Herald added a reviewer: jdoerfert.
Herald added projects: clang, LLDB.

This also removes the `-fdouble-square-bracket-attributes` command line flag, 
which seems to not be used anywhere. At least a code search exclusively found 
mentions of it in documentation: 
https://sourcegraph.com/search?q=context:global+-fdouble-square-bracket-attributes+-file:clang/*+-file:test/Sema/*+-file:test/Parser/*+-file:test/AST/*+-file:test/Preprocessor/*+-file:test/Misc/*+archived:yes&patternType=standard&sm=0&groupBy=repo


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151683

Files:
  clang/docs/LanguageExtensions.rst
  clang/include/clang/Basic/DiagnosticParseKinds.td
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Driver/Options.td
  clang/include/clang/Parse/Parser.h
  clang/lib/Basic/Attributes.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Lex/Lexer.cpp
  clang/lib/Parse/ParseDecl.cpp
  clang/lib/Parse/ParseDeclCXX.cpp
  clang/test/AST/ast-dump-attr.m
  clang/test/AST/ast-dump-c-attr.c
  clang/test/AST/attr-annotate-type.c
  clang/test/CodeGen/attr-btf_type_tag-func.c
  clang/test/CodeGen/attr-btf_type_tag-var.c
  clang/test/Frontend/noderef.c
  clang/test/OpenMP/assumes_messages_attr.c
  clang/test/OpenMP/openmp_attribute_compat.cpp
  clang/test/Parser/asm.c
  clang/test/Parser/c2x-attributes.c
  clang/test/Parser/c2x-attributes.m
  clang/test/Parser/cxx-decl.cpp
  clang/test/Parser/objc-attr.m
  clang/test/ParserHLSL/group_shared.hlsl
  clang/test/Preprocessor/has_c_attribute.c
  clang/test/Sema/annotate-type.c
  clang/test/Sema/annotate.c
  clang/test/Sema/attr-availability-square-brackets.c
  clang/test/Sema/attr-external-source-symbol-cxx.cpp
  clang/test/Sema/attr-external-source-symbol.c
  clang/test/Sema/attr-likelihood.c
  clang/test/Sema/attr-objc-bridge-related.m
  clang/test/Sema/attr-regparm.c
  clang/test/Sema/attr-type-safety.c
  clang/test/Sema/c2x-noreturn.c
  clang/test/Sema/internal_linkage.c
  clang/test/Sema/matrix-type-builtins.c
  clang/test/Sema/neon-vector-types.c
  clang/test/Sema/overload-arm-mve.c
  clang/test/Sema/overloadable.c
  clang/test/Sema/vector-gcc-compat.c
  clang/test/SemaCXX/attr-cxx-disabled.cpp
  clang/test/SemaObjC/attr-objc-gc.m
  clang/unittests/AST/AttrTest.cpp
  clang/utils/TableGen/ClangAttrEmitter.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -575,7 +575,6 @@
 // FIXME: We should ask the driver for the appropriate default flags.
 lang_opts.GNUMode = true;
 lang_opts.GNUKeywords = true;
-lang_opts.DoubleSquareBracketAttributes = true;
 lang_opts.CPlusPlus11 = true;
 
 // The Darwin libc expects this macro to be set.
Index: clang/utils/TableGen/ClangAttrEmitter.cpp
===
--- clang/utils/TableGen/ClangAttrEmitter.cpp
+++ clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -3387,14 +3387,10 @@
   // If this is the C++11 variety, also add in the LangOpts test.
   if (Variety == "CXX11")
 Test += " && LangOpts.CPlusPlus11";
-  else if (Variety == "C2x")
-Test += " && LangOpts.DoubleSquareBracketAttributes";
 } else if (Variety == "CXX11")
   // C++11 mode should be checked against LangOpts, which is presumed to be
   // present in the caller.
   Test = "LangOpts.CPlusPlus11";
-else if (Variety == "C2x")
-  Test = "LangOpts.DoubleSquareBracketAttributes";
 
 std::string TestStr = !Test.empty()
   ? Test + " ? " + llvm::itostr(Version) + " : 0"
Index: clang/unittests/AST/AttrTest.cpp
===
--- clang/unittests/AST/AttrTest.cpp
+++ clang/unittests/AST/AttrTest.cpp
@@ -157,7 +157,7 @@
   AST = buildASTFromCodeWithArgs(R"c(
 __auto_type [[clang::annotate_type("auto")]] auto_var = 1;
   )c",
- {"-fdouble-square-bracket-attributes"},
+ {},
  "input.c");
 
   {
Index: clang/test/SemaObjC/attr-objc-gc.m
===
--- clang/test/SemaObjC/attr-objc-gc.m
+++ clang/test/SemaObjC/attr-objc-gc.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fdouble-square-bracket-attributes -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-d

[Lldb-commits] [PATCH] D151683: [clang] Enable C++11-style attributes in all language modes

2023-05-29 Thread Nikolas Klauser via Phabricator via lldb-commits
philnik added inline comments.
Herald added subscribers: Michael137, JDevlieghere.



Comment at: clang/test/ParserHLSL/group_shared.hlsl:14
-// expected-error@+1 {{expected expression}}
 float groupshared [[]] i = 12;
 

Should this also get an extension warning/should attributes be disabled for 
HLSL?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151683/new/

https://reviews.llvm.org/D151683

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D150291: [Clang] Rename internal type identifier(s) for __bf16 to BF16Ty

2023-05-29 Thread M. Zeeshan Siddiqui via Phabricator via lldb-commits
codemzs abandoned this revision.
codemzs added a comment.

Closing this as it has been resolved by D150913 
.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150291/new/

https://reviews.llvm.org/D150291

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits