[llvm] r210118 - Remove some redundant doc comments

Sean Silva chisophugis at gmail.com
Fri Jun 6 18:52:26 PDT 2014


On Fri, Jun 6, 2014 at 7:29 PM, Alp Toker <alp at nuanti.com> wrote:

>
> On 07/06/2014 04:21, Sean Silva wrote:
>
>> An enormous number of classof's have a copypasted comment above them like
>> this. Are you planning on removing them too?
>>
>
> I guess we can go ahead and do it. I have the regex handy but in this
> instance I only took out the ones that were getting the way.
>
>
>
>> I was about to suggest to standardize on a copypasted comment that will
>> lead them to http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html, but it
>> turns out that that page is already the top result for `llvm classof`. Back
>> when I got started with LLVM `llvm classof` just turned up a bunch of
>> doxygen pages and I remember it taking me a while to figure it out...
>>
>
> Right, by now it's a fairly engrained and discoverable pattern. Given the
> brevity of most of the classof inline functions, the comments end up almost
> doubling the line count in places which irks me. What do you think?
>

I think I'll just defer to Chandler's preference here. So I guess for now
we'll leave them in.

-- Sean Silva


>
> Alp.
>
>
>
>> -- Sean Silva
>>
>>
>>
>> On Tue, Jun 3, 2014 at 1:06 PM, Alp Toker <alp at nuanti.com <mailto:
>> alp at nuanti.com>> wrote:
>>
>>     Author: alp
>>     Date: Tue Jun  3 14:06:49 2014
>>     New Revision: 210118
>>
>>     URL: http://llvm.org/viewvc/llvm-project?rev=210118&view=rev
>>     Log:
>>     Remove some redundant doc comments
>>
>>     Modified:
>>         llvm/trunk/include/llvm/IR/DiagnosticInfo.h
>>
>>     Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
>>     URL:
>>     http://llvm.org/viewvc/llvm-project/llvm/trunk/include/
>> llvm/IR/DiagnosticInfo.h?rev=210118&r1=210117&r2=210118&view=diff
>>     ============================================================
>> ==================
>>     --- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
>>     +++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Tue Jun  3
>>     14:06:49 2014
>>     @@ -138,7 +138,6 @@ public:
>>        /// \see DiagnosticInfo::print.
>>        void print(DiagnosticPrinter &DP) const override;
>>
>>     -  /// Hand rolled RTTI.
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_InlineAsm;
>>        }
>>     @@ -166,7 +165,6 @@ public:
>>        /// \see DiagnosticInfo::print.
>>        void print(DiagnosticPrinter &DP) const override;
>>
>>     -  /// Hand rolled RTTI.
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_StackSize;
>>        }
>>     @@ -195,7 +193,6 @@ public:
>>        /// \see DiagnosticInfo::print.
>>        void print(DiagnosticPrinter &DP) const override;
>>
>>     -  /// Hand rolled RTTI.
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_DebugMetadataVersion;
>>        }
>>     @@ -221,7 +218,6 @@ public:
>>        /// \see DiagnosticInfo::print.
>>        void print(DiagnosticPrinter &DP) const override;
>>
>>     -  /// Hand rolled RTTI.
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_SampleProfile;
>>        }
>>     @@ -261,7 +257,6 @@ public:
>>        /// \see DiagnosticInfo::print.
>>        void print(DiagnosticPrinter &DP) const override;
>>
>>     -  /// Hand rolled RTTI.
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_OptimizationRemark;
>>        }
>>     @@ -323,7 +318,6 @@ public:
>>            :
>>     DiagnosticInfoOptimizationRemarkBase(DK_OptimizationRemark, PassName,
>>                                                   Fn, DLoc, Msg) {}
>>
>>     -  /// Hand rolled RTTI
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_OptimizationRemark;
>>        }
>>     @@ -350,7 +344,6 @@ public:
>>            :
>>     DiagnosticInfoOptimizationRemarkBase(DK_OptimizationRemarkMissed,
>>                                                   PassName, Fn, DLoc,
>>     Msg) {}
>>
>>     -  /// Hand rolled RTTI
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_OptimizationRemarkMissed;
>>        }
>>     @@ -378,7 +371,6 @@ public:
>>            :
>>     DiagnosticInfoOptimizationRemarkBase(DK_OptimizationRemarkAnalysis,
>>                                                   PassName, Fn, DLoc,
>>     Msg) {}
>>
>>     -  /// Hand rolled RTTI
>>        static bool classof(const DiagnosticInfo *DI) {
>>          return DI->getKind() == DK_OptimizationRemarkAnalysis;
>>        }
>>
>>
>>     _______________________________________________
>>     llvm-commits mailing list
>>     llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>>     http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>>
>>
> --
> http://www.nuanti.com
> the browser experts
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140606/38a73766/attachment.html>


More information about the llvm-commits mailing list