/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #define VOID void class Class1 { SAL_CALL Class1() {} // expected-error {{SAL_CALL unnecessary here [loplugin:salcall]}} SAL_CALL ~Class1() {} // expected-error {{SAL_CALL unnecessary here [loplugin:salcall]}} SAL_CALL operator int() // expected-error {{SAL_CALL unnecessary here [loplugin:salcall]}} { return 0; } void SAL_CALL method1(); // expected-error {{SAL_CALL unnecessary here [loplugin:salcall]}} VOID method2() {} // no SAL_CALL for above method2, even though "SAL_CALL" appears between definition of VOID and // the declaration's name, "method2" }; void SAL_CALL Class1::method1() { // expected-error@-1 {{SAL_CALL unnecessary here [loplugin:salcall]}} } class Class2 { void method1(); // expected-note {{SAL_CALL inconsistency [loplugin:salcall]}} }; void SAL_CALL Class2::method1() {} // expected-error {{SAL_CALL inconsistency [loplugin:salcall]}} // comment this out because it seems to generate a warning in some internal buffer of clang that I can't annotate #if 0 // no warning, this appears to be legal class Class3 { void SAL_CALL method1(); // expected-error {{SAL_CALL unnecessary here [loplugin:salcall]}} }; void Class3::method1() {} #endif // no warning, normal case for reference class Class4 { void method1(); }; void Class4::method1() {} class Class5_1 { virtual void method1(); // expected-note {{SAL_CALL inconsistency [loplugin:salcall]}} virtual ~Class5_1(); }; class Class5_2 { virtual void SAL_CALL method1(); virtual ~Class5_2(); }; class Class5_3 : public Class5_1, public Class5_2 { virtual void SAL_CALL method1() override; // expected-error {{SAL_CALL inconsistency [loplugin:salcall]}} virtual ~Class5_3(); }; class Class6_1 { virtual void SAL_CALL method1(); virtual ~Class6_1(); }; class Class6_2 { virtual void SAL_CALL method1(); virtual ~Class6_2(); }; class Class6_3 : public Class6_1, public Class6_2 { virtual void SAL_CALL method1() override; virtual ~Class6_3(); }; class Class7_1 { virtual void method1(); virtual ~Class7_1(); }; class Class7_2 { virtual void method1(); virtual ~Class7_2(); }; class Class7_3 : public Class7_1, public Class7_2 { virtual void method1() override; virtual ~Class7_3(); }; class Class8_1 { virtual void method2(); virtual ~Class8_1(); }; class Class8_2 { virtual void SAL_CALL method2(); // expected-note {{SAL_CALL inconsistency [loplugin:salcall]}} virtual ~Class8_2(); }; class Class8_3 : public Class8_1, public Class8_2 { virtual void method2() override; // expected-error {{SAL_CALL inconsistency [loplugin:salcall]}} virtual ~Class8_3(); }; #define M1(m) VOID m class Class9 { Class9(); // expected-note {{SAL_CALL inconsistency [loplugin:salcall]}} M1(method1)(); // expected-note {{SAL_CALL inconsistency [loplugin:salcall]}} void method2(); // expected-note {{SAL_CALL inconsistency [loplugin:salcall]}} }; #define MC(num) \ Class##num::Class##num() {} SAL_CALL MC(9) // expected-error {{SAL_CALL inconsistency [loplugin:salcall]}} ; // to appease clang-format void SAL_CALL Class9::method1() // expected-error {{SAL_CALL inconsistency [loplugin:salcall]}} { } #define M2(T) T SAL_CALL M2(void) Class9::method2() {} // expected-error {{SAL_CALL inconsistency [loplugin:salcall]}} void SAL_CALL f0() {} // expected-error {{SAL_CALL unnecessary here [loplugin:salcall]}} void SAL_CALL f1() {} void SAL_CALL f2() {} void SAL_CALL f3() {} void SAL_CALL f4() {} typedef void SAL_CALL (*Ptr)(); void takePtr(Ptr); void usePtr() { f0(); takePtr(f1); takePtr(&f2); Ptr p = f3; takePtr(p); p = f4; takePtr(p); } #if 0 // see TODO in SalCall::isSalCallFunction class Class10 { void method1(); }; #define M3(T, SAL_CALL) T SAL_CALL:: M3(void, Class10) method1() {} // false "SAL_CALL inconsistency" #endif #if 0 //TODO template struct S { virtual ~S(); virtual void f(); }; template S::~S() {} template void S::f() {} struct S2: S { ~S2(); void f() {} }; int main() { S2 s2; s2->f(); } #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ llabora/cp-6.0-29 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-10GSoC: Template Manager: Enable Keyboard shortcutsAkshay Deep
delete key: delete operation shift-f10 and contextmenu: create context-menu ctrl + A: select all Conflicts: sfx2/source/control/templateabstractview.cxx Change-Id: I97486c050c5dbb88b8551aa8a9bb9ba4285ad003 Reviewed-on: https://gerrit.libreoffice.org/26044 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-09Templates: Display titles and category as tooltipsAkshay Deep
Tooltip text: 1. Template Manager: All Categories: Title + Category Category: Title 2. Start center: Title Conflicts: sfx2/source/doc/doc.hrc Conflicts: sfx2/source/doc/templatedlg.cxx Change-Id: I0bfd5e78120f13338f88c1b0617df3a057cce02f Reviewed-on: https://gerrit.libreoffice.org/26040 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com>
2016-06-09tdf#100260 Template Manager: Cannot open context menu without mouseAkshay Deep
Change-Id: I900cc79e2834c1942840ee9fb1a8ab680b646c92 Reviewed-on: https://gerrit.libreoffice.org/26082 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-07Reset Default in Context Menu for default templatesAkshay Deep
Change-Id: Ifedb4f5b4dada0e9e0ac40ffcaed4c2821df501d Reviewed-on: https://gerrit.libreoffice.org/25995 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-06loplugin:staticmethodsTor Lillqvist
Change-Id: I1c178eedb1443372cdc474e36133400c0ad476ba
2016-06-06loplugin:passstuffbyrefTor Lillqvist
Change-Id: Ie1cd7d63aaf2963137138def86cf5f4e141569b2
2016-06-06Mark Default Templates in Template ManagerAkshay Deep
Change-Id: I1dff486605efce09e862d2924b24949601ae0f17 Reviewed-on: https://gerrit.libreoffice.org/25816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-03Template Manager: Ctrl + A to select all templatesAkshay Deep
Change-Id: I8398268752c78a30d5fc076d6f2b6249cbf89ec2 Reviewed-on: https://gerrit.libreoffice.org/25860 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-03tdf#100195 Enable Keyboard Navigation in Template Manager and Start CenterAkshay Deep
Change-Id: Ic5447a4af091a4e3dcab4d909fc6bfb9e559defb Reviewed-on: https://gerrit.libreoffice.org/25848 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-05-30loplugin:unusedmethodsNoel Grandin
Change-Id: I08e9bb65b2530148b80c67f01d51e594fc698acb Reviewed-on: https://gerrit.libreoffice.org/25543 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26loplugin:unusedmethodsNoel Grandin
Change-Id: Ib36bc0e87d00abb638cbfec511cd13b6179eabda Reviewed-on: https://gerrit.libreoffice.org/25431 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-25New Template Manager: Remove inheritance of TemplateContainerItemAkshay Deep
Conflicts: include/sfx2/templatelocalview.hxx sfx2/source/control/templatelocalview.cxx Change-Id: I5eb120853be768c3770a71829c40d00c97fcdadb Reviewed-on: https://gerrit.libreoffice.org/25272 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-05-20New Template ManagerAkshay Deep
1. Save Mode removed from Template Manager 2. Context Menu for TemplateViewItems (Handled from LocalView for Local Repos) 3. 'showAllTemplates()' replacing 'showRootRegion()' 4. Filter Combobox for templates (Remembers filters also) 5. Search Filter (Synchronized with Filter ComboBoxes) 6. Removed Tabs from Template Manager 7. Removed Buttons from TemplateAbstractView 8. Unused GtkToolButtons removed 9. PushButtons in UI 10. Modal dialog for Import and Move (Works from "All Categories" now too) 11. ContextMenu for TemplateSearchView 12. Delete Categories(Folder) in Settings Menu 13. Save As Template Dialog Change-Id: I88f6568c35271c17dbd7e6877d50119a8cfe4d60 Reviewed-on: https://gerrit.libreoffice.org/24545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-04-11tdf#89095 Start Center: bigger thumbnails for templatesAkshay Deep
ThumbnailDefaultView is now able to dynamically update the size of the thumbnail in its item. Removed padding for thumbnails. Change-Id: Ibc267c848a844098a59525c76e234f4f9c4d0ed1 Reviewed-on: https://gerrit.libreoffice.org/23816 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-01-13loplugin:unusedmethods unused return value in include/sfx2Noel Grandin
Change-Id: Id4017bdfe18f8224d28a9f787865c7a880aeeed8
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-08-26Convert vcl Button Link<> click handler to typed Link<Button*,void>Noel Grandin
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-13make Link<> instances typedNoel Grandin
Change-Id: I7d20875cc498d54140cfe75b21373fdab9c369ce
2015-07-20convert to typed Link<> in sfx2Noel Grandin
Change-Id: Ifa42bd14d7329ff1043fa736513c468dda30485e Reviewed-on: https://gerrit.libreoffice.org/17195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-14refactor Template and ThumbnailView to use RenderContextTomaž Vajngerl
Change-Id: I7f4e3e9415219548c919d63c07c5c946bc609a7d
2015-04-30Gradually typed LinkStephan Bergmann
Turn the Link class into a template abstracting over the link's argument and return types, but provide default template arguments that keep the generic, unsafe "void* in, sal_IntPtr out" behvior. That way, individual uses of the Link class can be updated over time. All the related macros are duplicated with ..._TYPED counterparts, that additionally take the RetType (except for LINK_TYPED, which manages to infer the relevant types from the supplied Member). (It would have been attractive to change the "untyped" LinkStubs from taking a void* to a properly typed ArgType parameter, too, but that would cause -fsanitize=function to flag uses of "untyped" Link::Call.) Change-Id: I3b0140378bad99abbf240140ebb4a46a05d2d2f8
2015-04-29mass rewrite Paint(Rect&) to Paint(RenderContext&, Rect&)Tomaž Vajngerl
Change-Id: Ia1667246064d11827dbd149def15e5bf08b119b8
2015-04-09vcl: VclPtr conversion in sfx2Noel Grandin
Change-Id: I78ea3f4304ace27c6db0e3d0651bd65043dcbc68
2015-03-24convert FILTER_APPLICATION to enum classNoel Grandin
Change-Id: I9ad1d1c9a2d9d538a4cc95f0b65f45f631116916
2015-01-26new loplugin: change virtual methods to non-virtualNoel Grandin
Where we can prove that the virtual method is never overriden. In the case of pure-virtual methods, we remove the method entirely. Sometimes this leads to entire methods and fields being eliminated. Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-08-17warning C4800: forcing value to bool 'true' or 'false'Thomas Arnhold
Change-Id: I0bea774cd903f93721de6ffd8ed4ff9f5a15ef81
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-09loplugin: inlinesimplememberfunctionsNoel Grandin
Change-Id: I42119f656ca528286fb25d2d36c0af54b7d04a6b
2014-03-27Second batch of adding SAL_OVERRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: Ie656f9d653fc716f72ac175925272696d509038f
2014-02-12callcatcher: update unused codeCaolán McNamara
Change-Id: Iaaad9302ef8edb47fa95ce8ca608b6f36449521b
2013-10-23fixincludeguards.sh: include/s*Thomas Arnhold
Change-Id: I57fcfd442d2b5815e7c07a9cbd660f3698168dee
2013-09-19Make scrolling in ThumbnailView smoother and not per-lineKrisztian Pinter
Change-Id: I3df50dc953c6a5123b62f129b6e303ff682c6d9b Reviewed-on: https://gerrit.libreoffice.org/5951 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-08-30startcenter: Add toggle to view templates in Start CenterKrisztian Pinter
Change-Id: I17aa3bfbb7f4b0eca525dd15d6866c6951d5d20f Reviewed-on: https://gerrit.libreoffice.org/5543 Reviewed-by: Jan Holesovsky <kendy@suse.cz> Tested-by: Jan Holesovsky <kendy@suse.cz>
2013-08-19Refactor TemplateAbstractView to define file exts. in one placeKrisztian Pinter
Change-Id: I5d799f51c41d9b4f5a0161cf49e76d9539826d8f Reviewed-on: https://gerrit.libreoffice.org/5365 Reviewed-by: Petr Mladek <pmladek@suse.cz> Tested-by: Petr Mladek <pmladek@suse.cz>
2013-06-27Use larger (96*96) icons for templatesStefan Knorr
Change-Id: I0a7b88de53d47a935d6290c52ba8749d08187643 Reviewed-on: https://gerrit.libreoffice.org/4458 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr>
2013-04-23execute move of global headersBjoern Michaelsen
see https://gerrit.libreoffice.org/#/c/3367/ and Change-Id: I00c96fa77d04b33a6f8c8cd3490dfcd9bdc9e84a for details Change-Id: I199a75bc4042af20817265d5ef85b1134a96ff5a