[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-18 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair edited https://github.com/llvm/llvm-project/pull/97597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-18 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 6dfbc7b61b137fdfd9d39b23bce62e451dca3e1c Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH] [Sema][ObjC] Add warning options to detect bad name prefixes.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-18 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From c11624370bf5615c7902993052435b92ae50b41b Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/8] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-17 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 48f55ba9d8e51cf976a8789521dd0763dea1e2d1 4980fcd7f274bba007c48aedb3b85c15c5796e3d --e

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-17 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From c11624370bf5615c7902993052435b92ae50b41b Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/8] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-16 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From c11624370bf5615c7902993052435b92ae50b41b Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/7] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/6] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/5] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/4] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/3] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Timm Baeder via cfe-commits
@@ -204,6 +204,89 @@ void Parser::CheckNestedObjCContexts(SourceLocation AtLoc) Diag(Decl->getBeginLoc(), diag::note_objc_container_start) << (int)ock; } +/// An Objective-C public name (a class name or protocol name) is +/// expected to have a prefix as all names are in a

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Alastair Houghton via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 %s -Wobjc-prefixes=NS,NSCF,NSURL -fsyntax-only -verify al45tair wrote: Hmmm, maybe, yes. Not hard to add. https://github.com/llvm/llvm-project/pull/97597 ___ cfe-commits mailing lis

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-04 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/2] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-03 Thread Jon Roelofs via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 %s -Wobjc-prefixes=NS,NSCF,NSURL -fsyntax-only -verify jroelofs wrote: is it worth adding a `-Wobjc-forbidden-prefixes=NS`, so you can e.g. forbid things outside of Foundation from defining things with the `NS` prefix? https

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-03 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair updated https://github.com/llvm/llvm-project/pull/97597 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Wed, 3 Jul 2024 17:00:51 +0100 Subject: [PATCH 1/2] [Parser][ObjC] Add -Wobjc-prefix-length warning option.

[clang] [Parser][ObjC] Add -Wobjc-prefix-length warning option. (PR #97597)

2024-07-03 Thread Alastair Houghton via cfe-commits
https://github.com/al45tair created https://github.com/llvm/llvm-project/pull/97597 This lets clang generate warnings automatically if it sees Objective-C names that don't have the correct prefix length. rdar://131055157 >From 02f7c5ef71b382866e02037ce82c85fa6fcbb394 Mon Sep 17 00:00:00 2001